Closed Bug 1941006 Opened 24 days ago Closed 14 days ago

Unable to open developer tools

Categories

(DevTools :: General, defect, P2)

Firefox 136
defect

Tracking

(firefox-esr128 unaffected, firefox134 unaffected, firefox135 verified, firefox136 verified)

VERIFIED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- unaffected
firefox135 --- verified
firefox136 --- verified

People

(Reporter: eight04, Assigned: ochameau)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression, Whiteboard: [devtools-triage])

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0

Steps to reproduce:

Press F12 or right-click > inspect elements.

Actual results:

An empty window is opened:
https://imgsh.net/i/aedf6664a0

Expected results:

Open the developer tool.

It worked fine after restarting the browser, but broken again after a while.

After closing the empty window, pressing F12 does nothing. There is an error in the browser console (Ctrl-Shift-J):
https://imgsh.net/i/13afe0ebfc

The Bugbug bot thinks this bug should belong to the 'DevTools::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → DevTools

Thanks for the report,

Throwing on the line reported by the browser console doesn't seem to lead to a blank toolbox, so there was probably another error earlier in the logs.

If you have the issue again, can you share more (all?) logs from the browser console?
You can right click on the console and use "Copy all Messages" to do it easily.

Thanks

Severity: -- → S3
Flags: needinfo?(eight04)
Priority: -- → P2

Happened again when trying inspecting an element. Here is the screenshot of browser console:
https://imgsh.net/i/f0f360aee7
There are thousands of messages since I didn't shutdown my PC for days. The screenshot contains all messages after the right click.

After that, I right-clicked > inspect element and got this error:
https://imgsh.net/i/9616e331d7

Flags: needinfo?(eight04)

Thanks, that helps a bit, although I would be curious to see what failed prior to the watchTargets error message.
You can select "Show timestamps" in the Console settings (top right "Gear" icon), if that can help you select only the logs relevant to the blank devtools issue.

I found the STR:

  1. Install LiveTL: https://addons.mozilla.org/zh-TW/firefox/addon/livetl/
  2. Disable the extension.
  3. Open a youtube live stream e.g. https://www.youtube.com/watch?v=WB2nTzxJ2HQ
  4. Restart the browser. Wait for the chat.
  5. Right-click on the page -> inspect.
  6. The devtools loads correctly. Close devtools.
  7. Enable the LiveTL extension.
  8. Right-click on the page -> inspect.
  9. The devtools doesn't load.

However, I can only reproduce the issue with my default profile. All extensions were disabled except LiveTL.

Tried creating a new profile but can't reproduce.

Here is the log from browser console.

That's great, thanks for all the details! Hopefully we can track this down now.

Alex: anything interesting in the logs? Given that it seems webextensions related maybe you can spot something here?

Flags: needinfo?(poirot.alex)

I'm encountering the same issue on 135.0b6. It shows a blank panel when opening dev tools (via F12). The issue doesn't seem to be limited to any one site, however I can get it to happen 100% of the time on https://www.bulkwholesale.com.au/

I've attached the relevant browser console log.

I played around with it more and it happens when devtools.debugger.show-content-scripts is true.

Thanks! Putting the bug back to triage to make sure we have some eyes on it this week.

Whiteboard: [webdriver:triage]

Thanks a lot :eight04 and :sorty125, I can easily reproduce and fix this issue.

Assignee: nobody → poirot.alex
Flags: needinfo?(poirot.alex)
Whiteboard: [webdriver:triage] → [devtools-triage]
Attachment #9460471 - Attachment description: Bug 1941006 - [devtools] Fix DevTools crash when extensions spawn a sandbox without metadata. → Bug 1941006 - [devtools] Fix DevTools when debugging a page with an extension document used in an iframe.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68c18431d3f8 [devtools] Fix DevTools when debugging a page with an extension document used in an iframe. r=jdescottes,devtools-reviewers
Status: UNCONFIRMED → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch

Should we try to uplift this one?

Flags: needinfo?(poirot.alex)
Keywords: regression
Regressed by: 1413872

Set release status flags based on info from the regressing bug 1413872

Comment on attachment 9460471 [details]
Bug 1941006 - [devtools] Fix DevTools when debugging a page with an extension document used in an iframe.

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: DevTools can't be opened on web pages where an extension inserts an iframe with extension document.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: * toggle devtools.debugger.show-content-scripts to true (can also be toggled from the debugger source tree settings icon)
  • Install LiveTL: https://addons.mozilla.org/zh-TW/firefox/addon/livetl/
  • Open a youtube live stream e.g. https://www.youtube.com/watch?v=WB2nTzxJ2HQ
  • Wait for the chat to appear in youtube. The addon will inject an iframe in the chat.
  • open devtools

DevTools will be blank without this patch.

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The fix is really naive.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(poirot.alex)
Attachment #9460471 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Duplicate of this bug: 1939552

Comment on attachment 9460471 [details]
Bug 1941006 - [devtools] Fix DevTools when debugging a page with an extension document used in an iframe.

This needs a rebased patch for Beta uplift.

Flags: needinfo?(poirot.alex)
Attachment #9460471 - Flags: approval-mozilla-beta?
Flags: in-testsuite+

Bug 1214658 hacks the content script sandboxes to used them for iframes loading
extension documents. These documents expect the privileged chrome/browser APIs,
which are exposed by spawning a content script sandboxes.
These sandboxes won't have any metadata as they don't really are content scripts.
These sandboxes won't execute any script.
They will only be used to expose chrome/browser APIs to these iframes.

Attachment #9461081 - Flags: approval-mozilla-beta?
Attachment #9461081 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(poirot.alex)
QA Whiteboard: [qa-triaged]

Hello! Reproduced the issue with Firefox 136.0a1 (2025-01-10) on Windows 10x64 by following steps from comment 17. Devtools is blank after opening it.
The issue is verified fixed with Firefox 136.0a1 (2025-01-22) and 135.0b9 (20250122203829) on Windows 10x64, macOS 12 and Ubuntu 24. The dev tools is correctly displayed after following the steps from comment 17.

Status: RESOLVED → VERIFIED
Has STR: --- → yes
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: