Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn’t retrieve the profile from ⁨Firefox (WebExtension Tabs) #5339

Open
qupig opened this issue Jan 21, 2025 · 4 comments
Open

Couldn’t retrieve the profile from ⁨Firefox (WebExtension Tabs) #5339

qupig opened this issue Jan 21, 2025 · 4 comments

Comments

@qupig
Copy link

qupig commented Jan 21, 2025

It cannot work on any extension page. For example the uBlock:
moz-extension://3a9ade8b-2c81-40bb-8728-842e0c0f5279/dashboard.html#settings.html

After capturing and opening the new page, it prompts:

https://profiler.firefox.com/from-browser
Firefox Profiler
Couldn’t retrieve the profile from ⁨Firefox⁩.
Error: Error: Could not find a profile for this tab.
The full stack has been written to the Web Console.

   __ _           __                                  
 / _(_)         / _|                                 
| |_ _ _ __ ___| |_ _____  __                        
|  _| | '__/ _ \  _/ _ \ \/ /                        
| | | | | |  __/ || (_) >  <       __ _ _            
|_| |_|_|  \___|_| \___/_/\_\     / _(_) |           
    ,.       ,.   _ __  _ __ ___ | |_ _| | ___ _ _   
    | \     / |  | '_ \| '__/ _ \|  _| | |/ _ \ '_|  
    |/ \ _ / \|  | |_) | | | (_) | | | | |  __/ |    
    |         |  | .__/|_|  \___/|_| |_|_|\___|_|    
    /  -    - \  |_|                                 
  ,-    V__V   -.                                    
 -=  __-  * - .,=-                                   
  `\_    -   _/                                      
      `-----'                                        main.aea386f0726a55caa88a.bundle.js:172:1408
The following profiler information and tools are available via the console:

window.profile - The currently loaded profile
window.filteredThread - The current filtered thread
window.filteredMarkers - The current filtered and processed markers
window.selectedMarker - The selected processed marker in the current thread
window.callTree - The call tree of the current filtered thread
window.getState - The function that returns the current Redux state.
window.selectors - All the selectors that are used to get data from the Redux state.
window.dispatch - The function to dispatch a Redux action to change the state.
window.actions - All the actions that can be dispatched to change the state.
window.experimental - The object that holds flags of all the experimental features.
window.togglePseudoLocalization - Enable pseudo localizations by passing "accented" or "bidi" to this function, or disable using no parameters.
window.toggleTimelineType - Toggle timeline graph type by passing "cpu-category", "category", or "stack".
window.retrieveRawProfileDataFromBrowser - Retrieve the profile attached to the current tab and returns it. Use "await" to call it, and use saveToDisk to save it.
window.extractGeckoLogs - Retrieve recorded logs in the current range, using the MOZ_LOG format. Use with "copy" or "saveToDisk".
window.saveToDisk - Saves to a file the parameter passed to it, with an optional filename parameter. You can use that to save the profile returned by "retrieveRawProfileDataFromBrowser" or the data returned by "extractGeckoLogs".

The profile format is documented here:
https://github.com/firefox-devtools/profiler/blob/main/docs-developer/processed-profile-format.md

The CallTree class's source code is available here:
https://github.com/firefox-devtools/profiler/blob/main/src/profile-logic/call-tree.js main.aea386f0726a55caa88a.bundle.js:172:2326
Error: Error: Could not find a profile for this tab.
    e web-channel.js:333
main.aea386f0726a55caa88a.bundle.js:80:1936
    _p receive-profile.js:1181
    Redux 2
    Jp receive-profile.js:1749
    Redux 2
    _processInitialUrls UrlManager.js:133
    componentDidMount UrlManager.js:214
    React 12
    Redux 10
    _setupLocalization AppLocalizationProvider.js:84
    componentDidUpdate AppLocalizationProvider.js:92
    React 9
    w scheduler.production.min.js:13
    _ scheduler.production.min.js:14
    (Async: EventHandlerNonNull)
    7463 scheduler.production.min.js:14
    Webpack 13
Error: Error: Could not find a profile for this tab.
    e web-channel.js:333
main.aea386f0726a55caa88a.bundle.js:137:158331
    render AppViewRouter.js:93
    React 13
    Redux 15
    _p receive-profile.js:1180
    Redux 2
    Jp receive-profile.js:1749
    Redux 2
    _processInitialUrls UrlManager.js:133
    componentDidMount UrlManager.js:214
    React 12
    Redux 10
    _setupLocalization AppLocalizationProvider.js:84
    componentDidUpdate AppLocalizationProvider.js:92
    React 9
    w scheduler.production.min.js:13
    _ scheduler.production.min.js:14
    (Async: EventHandlerNonNull)
    7463 scheduler.production.min.js:14
    Webpack 13

Firefox Developer Edition: 135.0b5 (aarch64)

Possibly related issues:

┆Issue is synchronized with this Jira Task

@qupig
Copy link
Author

qupig commented Jan 21, 2025

If I switch to a normal tab and stop capturing after the operation is completed, it can load normally.

That is to say, only when the current tab is an extensions page, the above error will occur after stopping the capture.

I tested that the issue can also be reproduced in Firefox 128.6.0esr.

@julienw
Copy link
Contributor

julienw commented Jan 21, 2025

Interesting, it still works for me with the ublock origin settings page (like I mentionned in #4880).

Can you please share if you use the devtools' performance tab or the profiler's tabbar button to profile? If you used one of them, can you try the other way as well? Can you also look if you see anything suspicious in the Browser Console? (it's in the Tools Menu > Browser Tools submenu)

Do you use container tabs? Can you also share your about:support data (click on "copy raw data on clipboard" then paste it in a file)? You can send it to my mail directly if you'd prefer to not link it here (first name @ mozilla.com).

@qupig
Copy link
Author

qupig commented Jan 21, 2025

I tried two methods, obviously the first one cannot change the tab before the stop.
The "tabbar button" is used in the second comment above.
i.e. As long as I switch to a normal tab before the stop, it can be opened normally.

I didn't see any errors in the browser console.

@qupig
Copy link
Author

qupig commented Jan 21, 2025

Not only any moz-extension://* tabs, all about:* tabs also has the same situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants