Gecko-Profiler-Addon icon indicating copy to clipboard operation
Gecko-Profiler-Addon copied to clipboard

Error: "Unable to connect to the Gecko profiler add-on within five seconds."

Open mikeconley opened this issue 9 years ago • 5 comments

Originally filed at https://github.com/bgirard/Gecko-Profiler-Addon/issues/115, and quoting mostly verbatim.

Build identifier: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

I'm using Gecko Profile 0.8, from today, May 9th.

Invoking a profile capture, I just got:

6b0c7f7a-34ad-11e7-881b-9286764f50ce

Stack:

Error: Unable to connect to the Gecko profiler add-on within five seconds.
Stack trace: e/</<@https://perf-html.io/9170dacdedc70ab6d307.bundle.js:30:6819 9170dacdedc70ab6d307.bundle.js:33:6467
Unhandled promise rejection Error: Unable to connect to the Gecko profiler add-on within five seconds.
Stack trace:
e/</<@https://perf-html.io/9170dacdedc70ab6d307.bundle.js:30:6819 9170dacdedc70ab6d307.bundle.js:35:46
Successfully compiled asm.js code (loaded from cache in 9169ms)
zee-worker.js

mikeconley avatar May 09 '17 20:05 mikeconley

Thanks.

I just landed a workaround for this in https://github.com/devtools-html/perf.html/pull/312 but I think this is also a problem on the add-on side. I think this is happening because it takes longer than 5 seconds for the profile to arrive at the content process, due to the expensive structured cloning that's currently happening in the parent process. But our content script should be trying to connect to the page as soon as it can, without waiting for the profile.

mstange avatar May 09 '17 20:05 mstange

I believe you can side-step the structured clone problem if you stringify the profile first before sending it through. Last I heard, sad as it is, this was faster than structured clone.

mikeconley avatar May 09 '17 21:05 mikeconley

Yes, we can side-step it. I'd prefer an array buffer over a string, though.

mstange avatar May 09 '17 21:05 mstange

Stupid discovery of the day: I couldn't really really get the profile to load after "capture". Even after minutes for 10 seconds of recording. And since quite some months by now.

I toggled off some of the default features checkboxes.. I lowered resolution and buffer size.. I pressed "apply" (rather than start) and it worked. :
Not to mention that when I put everything back to vanilla.. It still continued to work even then

mirh avatar Jun 04 '18 22:06 mirh

Not sure there is anything actionable here. This infrastructure has changed a bit in the last few months. If there are any new issues please re-file with steps to reproduce here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Performance+Tools+%28Profiler%2FTimeline%29

gregtatum avatar Mar 27 '20 18:03 gregtatum