react: [DevTools Bug]: "Message length exceeded maximum allowed length" when profiling a complex application
Website or app
N/A
Repro steps
When profiling a complex, proprietary app, I regularly get an error message, “Message length exceeded maximum allowed length.”
Steps to reproduce:
- Within the Dev Tools, go to the Profiler tab.
- Click the “Start Profiling” button.
- Let the app run for a bit. Do some things in the app.
- Click the “Stop Profiling” (“record”) button.
At this point, the Chrome Dev Tools console logs an error:
contentScript.js:116 Uncaught Error: Message length exceeded maximum allowed length.
at handleMessageFromPage (contentScript.js:116:10)
And the Profiler tab is stuck with the message, “Processing data… This should only take a minute.”
The error is thrown from https://github.com/facebook/react/blob/64fe791be84ad04a4a1d005376ba5cf5701db9b7/packages/react-devtools-extensions/src/contentScript.js#L36
The last time this occurred, when breaking on exceptions at that line, JSON.stringify(event.data.payload).length reports 92074565. I can provide further information on the contents of the problematic event.data.payload if that would be helpful.
I apologize for the lack of a reproducible test case - it’s a complex app (which is why I was looking into profiling), and I don’t think I could simplify it down to a public test case while triggering the error.
How often does this bug happen?
Often
DevTools package (automated)
No response
DevTools version (automated)
No response
Error message (automated)
No response
Error call stack (automated)
No response
Error component stack (automated)
No response
GitHub query string (automated)
No response
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 27
- Comments: 21
Commits related to this issue
- fixed issue — committed to archignes/searchjunct by danielsgriffin 3 years ago
That’s the whole reason I’m profiling in the first place! This is quite a catch-22 situation, lol
Looks like it’s a chrome/chromium specific issue (Message length exceeded maximum allowed length). I tried profiling using React DevTools in Firefox and didn’t face this.
Hi, we face this issue when debugging FireCMS. It is a fairly large project. It is all open source and can be run locally: https://github.com/firecmsco/firecms
If you would like to give it a try, running it should be as simple as
yarnandyarn devGot the same issue, any updates? Is there a workaround?