Dashboard - logs page - crashes on Mongo DB erros #1619
Labels
state:duplicate
Duplicate of already reported issue
type:bug
Impaired feature or lacking behavior that is likely assumed
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
You're running version >=1.0.23 of Parse Dashboard.
You're running version >=2.3.2 of Parse Server.
You've searched through existing issues. Chances are that your issue has been reported or resolved before.
####What
Dashboard - logs page - When having mongo DB Error written to log it causes the dashboard logs page to crash
####Why
I think its because that the message of mongo error has a message object and not message text like other parse errors.
How to solve
LogViewEntry.react.js, getLogEntryInfo function on line 27
let timeStampStr = str.match(re) ? str.match(re)[0] : '';
i Would add make sure str exist and str.match is a function
Environment Setup
AWS linux
"parse-dashboard": "^2.1.0",
"parse-server": "^4.4.0",
Steps to reproduce
Just add "Bad log line" to active log file and then go to dashboard logs page
*** Bad log line***
{"message":{"ok":0,"code":96,"codeName":"OperationFailed","name":"MongoError"},"code":1,"level":"error","stack":"Error: MongoError: Executor error during find command :: caused by :: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.\n at /Users/zivchen/Documents/Business/edocate/edocate-server-parse/node_modules/parse-server/src/Controllers/DatabaseController.js:1319:27\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:97:5)","timestamp":"2020-11-08T09:56:29.177Z"}
Logs/Trace
dashboard.bundle.js:45 TypeError: t.match is not a function
at pd (dashboard.bundle.js:95)
at Go (dashboard.bundle.js:45)
at gs (dashboard.bundle.js:45)
at lu (dashboard.bundle.js:45)
at su (dashboard.bundle.js:45)
at Zs (dashboard.bundle.js:45)
at dashboard.bundle.js:45
at t.unstable_runWithPriority (dashboard.bundle.js:53)
at Ui (dashboard.bundle.js:45)
at Vi (dashboard.bundle.js:45)
es @ dashboard.bundle.js:45
The text was updated successfully, but these errors were encountered: