Closed Bug 1741708 Opened 2 years ago Closed 2 years ago

Add an option to show only the extension's errors in about:debugging

Categories

(DevTools :: about:debugging, defect, P3)

Firefox 94
defect

Tracking

(firefox-esr91 unaffected, firefox94 unaffected, firefox95 unaffected, firefox96 wontfix, firefox97 fixed, firefox98 verified)

VERIFIED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- unaffected
firefox95 --- unaffected
firefox96 --- wontfix
firefox97 --- fixed
firefox98 --- verified

People

(Reporter: petr.laskevic, Assigned: ochameau)

References

Details

(Keywords: regression)

Attachments

(5 files)

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

Steps to reproduce:

Install an extension (addon) from addons.mozilla.org
Notice it doesn't work (this was my addon so I'm curious why)
Open about:debugging
Select expect on my extension to view errors

Actual results:

I get totally lost when there are 20 other addons all showing their logs and errors.

Expected results:

There is a checkbox to only view errors of the inspected extension, so I find relevant logs and errors fast

The Bugbug bot thinks this bug should belong to the 'Toolkit::Add-ons Manager' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Add-ons Manager
Product: Firefox → Toolkit
Component: Add-ons Manager → about:debugging
Product: Toolkit → DevTools

Thanks for logging, could you share some of the addons you use in your profile so that we can reproduce the bug?

Flags: needinfo?(petr.laskevic)

:ochameau looked at the code, and we apparently don't filter errors coming from other extensions at all. Should be reproducible with any extension then.

Severity: -- → S3
Flags: needinfo?(petr.laskevic)
Priority: -- → P3
Assignee: nobody → poirot.alex
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1675456

The original report isn't against Nightly and so is before bug 1675456 landed.
It means that on current release, we are still going throught the WebConsole actor
and use ConsoleServiceListener, which isn't filtering anything:
this.window is null because targetActor.isRootActor=true:
https://searchfox.org/mozilla-central/rev/65d4d3399afa79c8de5a0cc11752d2ba7c31edc1/devtools/server/actors/webconsole/listeners/console-service.js#72-102)
=> on release we log all exception, like the MBT.

Whereas on Nightly, bug 1675456 kicks in and we are going using ErrorMessageWatcher.
This time, this class filter out everything, so that we never log any error.
Or may be the one related to the top-most browser window.
Long story short, this class doesn't support WebExtension codepath.

This patch addresses the watcher class codepath. Only tests should be using the console actor and ConsoleServiceListener.

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

This will be used in following changeset to better identify docshells related to the add-on.

We were iterating over all parent process docshells...
so debugging one web extension would probably have side effects on the whole browser
instead of only the web extension itself!

It is a bit hard to cover this with a test as that's some server side only data,
but the following patch and test only works with this being fixed.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a6147885938
[devtools] Pass the add-on's BrowsingContext group ID down to the WebExtension target actor. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/b530b0c4f4c7
[devtools] From the WebExtensionTargetActor, ensure debugging only the documents related to the add-on. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/ce5f81f38c5b
[devtools] Fix exception message filtering for Web extension debugging. r=jdescottes
https://hg.mozilla.org/integration/autoland/rev/74d153fe3e84
[devtools] Also fix CSS error message filtering. r=jdescottes
Depends on: 1675456
No longer regressed by: 1675456

Is this something we are targeting for 96 or now 97 based on comment 4? thank you!

Flags: needinfo?(poirot.alex)
Regressions: 1744778

(In reply to Dianna Smith [:diannaS] from comment #12)

Is this something we are targeting for 96 or now 97 based on comment 4? thank you!

We can target 97.
I actually rephrase my changeset comment on phabricator and this isn't reflected on bugzilla.
I was wrong in comment 4, bug 1675456 actually improved things significantly. These was still a small edgecase that I'm fixing here.

Flags: needinfo?(poirot.alex)
QA Whiteboard: [qa-97b-p2]

I tried to reproduce this issue on Win10x64 using builds 96.0a1 and 94.0a1(20210906214243), but with no luck, can you please mention what addons did you use? (I tried emoji, Notefox: Websites notes, uBlock Origin, ScrollAnywhere).
Is the issue still reproducing on your side on latest 97.0? Thank you.

Flags: needinfo?(petr.laskevic)

(In reply to Monica Chiorean from comment #15)

I tried to reproduce this issue on Win10x64 using builds 96.0a1 and 94.0a1(20210906214243), but with no luck, can you please mention what addons did you use? (I tried emoji, Notefox: Websites notes, uBlock Origin, ScrollAnywhere).
Is the issue still reproducing on your side on latest 97.0? Thank you.

I can reproduce it on release version 95.0. On Nightly version 98.0a1 it has been fixed. I use Dark Reader, Save Page WE and more addons. The more addons you install the more likely you will see their errors

Flags: needinfo?(petr.laskevic)

(In reply to petr.laskevic from comment #16)

(In reply to Monica Chiorean from comment #15)

I tried to reproduce this issue on Win10x64 using builds 96.0a1 and 94.0a1(20210906214243), but with no luck, can you please mention what addons did you use? (I tried emoji, Notefox: Websites notes, uBlock Origin, ScrollAnywhere).
Is the issue still reproducing on your side on latest 97.0? Thank you.

I can reproduce it on release version 95.0. On Nightly version 98.0a1 it has been fixed. I use Dark Reader, Save Page WE and more addons. The more addons you install the more likely you will see their errors

Fix is included on Nightly version 98.0a1 and Beta 97.0 so that is why it not reproducing. Issues exist on 95.0 because it does not have the fix. Marking as verified based on comment#16.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-97b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: