"Firefox Profiler Couldn’t retrieve the profile from Firefox." [Failed to get the active browserId while starting the profiler recording-utils.js:]
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
People
(Reporter: mbfdias, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
63.17 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
Steps to reproduce:
when I start the profiler, I can do through start recording and capture recording, but then I end up on a page with "Firefox Profiler
Couldn’t retrieve the profile from Firefox.
Error: /from-browser only works in Firefox browsers
The full stack has been written to the Web Console.
Back to home"
and can't actually do any profiling :-(
Actual results:
Firefox Profiler
Couldn’t retrieve the profile from Firefox.
Error: /from-browser only works in Firefox browsers
The full stack has been written to the Web Console.
Back to home
and the console has this error: (also attached the screen shot of the error)
Failed to get the active browserId while starting the profiler. recording-utils.js:29:11
getActiveBrowserID resource://devtools/shared/performance-new/recording-utils.js:29
startProfiler resource://devtools/server/actors/perf.js:64
handler resource://devtools/shared/protocol/Actor.js:196
onPacket resource://devtools/server/devtools-server-connection.js:371
_onJSONObjectReady resource://devtools/shared/transport/transport.js:463
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
Expected results:
profiled data should be sent to https://profiler.firefox.com
Comment 1•2 months ago
|
||
Similar to bug 1787457, but that reporter didn't have trouble starting it.
I get the same error on error console about browserid, so I think that is just normal. I was able to profile on Mac daily build. I haven't tested esr.
Comment 2•2 months ago
|
||
Looks like the profiler website has started to do user-agent sniffing. Daily identifies as Firefox so it's still working there.
Updated•2 months ago
|
Comment 3•2 months ago
|
||
It's interesting, because the code that does this error hasn't changed since 2021. Maybe it never worked in some versions of thunderbird? I can reproduce with my version of Thunderbird, so I'll follow-up on the github bug.
The browserId error is a red herring: it's about the currently active tab, but thunderbird doesn't usually have tabs hence the error.
Comment 4•2 months ago
|
||
As a temporary workaround, you can profile with these steps:
- launch thunderbird with --start-debugger-server
- connect to thunderbird from firefox' about:debugging page (to localhost:6000)
- click "profile performance" at the top of the page
Comment 5•2 months ago
|
||
We can definitely sniff Thunderbird in our code, but I do think that Thunderbird's user agent should include Firefox/<something>
like all other Gecko and Firefox-based browsers I've looked for. What do you think Wayne? Is there a reason this isn't the case?
Comment 6•2 months ago
|
||
The current user agent looks like so
"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Thunderbird/128.2.3"
IMO it should look something like this:
"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0 Thunderbird/128.2.3"
Comment 7•2 months ago
•
|
||
Looks like this was changed in https://bugzilla.mozilla.org/show_bug.cgi?id=1903451
No I misread the patch.
Comment 8•2 months ago
|
||
No, it was not. That was already the state on non-Nightly builds.
Only Daily identifies as Firefox, because we needed it for FxA to implement Sync, and the Sync code only exists on Nightly.
Comment 9•2 months ago
|
||
Yeah sorry, I misread the patch.
Updated•2 months ago
|
Just curious, is there any specific reason not to set general.useragent.compatMode.firefox
to true
and add Firefox/x.y.z in every channels of Thunderbird in general?
Comment 11•2 months ago
|
||
I found the regression comes from a commit in the recent patch https://github.com/firefox-devtools/profiler/pull/5105, indeed the user agent sniffing code is there since 2021 but before that patch we were giving it always the Firefox user agent, so this was working in thunderbird.
I'm adding the check for Thunderbird in https://github.com/firefox-devtools/profiler/pull/5105.
My question in comment 5 and 6 about Thunderbird'd user agent is still valid :-)
Comment 12•2 months ago
|
||
Fix landed and deployed.
Let's keep the bug open until the question about user agents is answered :-)
Comment 13•2 months ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #5)
We can definitely sniff Thunderbird in our code, but I do think that Thunderbird's user agent should include
Firefox/<something>
like all other Gecko and Firefox-based browsers I've looked for. What do you think Wayne? Is there a reason this isn't the case?
Thanks. I think this is best answered by Rob or Magnus.
Reporter | ||
Comment 14•2 months ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #12)
Fix landed and deployed.
Let's keep the bug open until the question about user agents is answered :-)
I can confirm :) it works now :D
Comment 15•2 months ago
|
||
I'll defer to Magnus on this as the userAgent string can appear in mail headers as well. I doubt that would affect much, but who knows...
Updated•2 months ago
|
Comment 16•2 months ago
|
||
Thanks Julien, I'd found that commit and suspected it was the cause but never looked at the whole patch, only one of the file changes.
AIUI not having Firefox in the UA string comes from a time when Firefox and Thunderbird were both Mozilla's headline products, built on top of a shared code base. Thunderbird wasn't (and isn't) Firefox with some changes. IMO we should keep our identities separate, even if it does cause some minor problems like this one occasionally. There's enough information in our UA string about our rendering engine (Gecko/20100101
) but I can understand why a site like profiler.firefox.com might go looking for the Firefox part of the string.
Comment 17•2 months ago
|
||
It's possible setting general.useragent.compatMode.firefox
would be beneficial to compatibility, but yeah, we hadn't had too much problems with the current setting.
Description
•