firefox-devtools / firefox-devtools/profiler

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

Open
#5,339 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

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.

```log
__ _ __
/ _(_) / _|
| |_ _ _ __ ___| |_ _____ __
| _| | '__/ _ \ _/ _ \ \/ /
| | | | | | __/ || (_) > < __ _ _
|_| |_|_| \___|_| \___/_/\_\ / _(_) |
,. ,. _ __ _ __ ___ | |_ _| | ___ _ _
| \ / | | '_ \| '__/ _ \| _| | |/ _ \ '_|
|/ \ _ / \| | |_) | | | (_) | | | | | __/ |
| | | .__/|_| \___/|_| |_|_|\___|_|
/ - - \ |_|
,- 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:
- #4880

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-870)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.