Closed Bug 1724718 Opened 3 years ago Closed 2 years ago

Also MOZ_CRASH for missing files that go through CreateLocalJarInput helper

Categories

(Firefox :: General, defect)

Desktop
All
defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox93 --- wontfix
firefox111 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Depends on 4 open bugs)

Details

Attachments

(10 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Andrei reported an issue with the crashes from bug 1721627 that happened locally but not on infra. When narrowing that down, I realized that I missed a JAR helper that gets called off-mainthread. Let's fix that. There's probably more brokenness lurking here. I think we've missed all async calls on jar: channels so far, which is likely to include missing images in various tests...

Luca or Mark, the trypush is flagging up this:

https://searchfox.org/mozilla-central/rev/f71cb98fc35da418d2cb9ce31a0416d532dc9d69/toolkit/mozapps/extensions/content/abuse-report-panel.js#755

returns undefined in some cases, which means we try to load chrome://mozapps/content/extensions/undefined, which of course doesn't exist.

(from local running, the JS stack looks like this:

0 update() ["chrome://mozapps/content/extensions/abuse-report-panel.js":618:22]
    this = [object HTMLElement]
1 setAbuseReport(abuseReport = "[object Object]") ["chrome://mozapps/content/extensions/abuse-report-panel.js":642:11]
    this = [object HTMLElement]
2 <TOP LEVEL> ["chrome://mozapps/content/extensions/abuse-report-panel.js":864:5]

Is it expected the iconURL or add-on can be missing here sometimes, and in that case, should we load nothing or a fallback image of some sort? Or are both the add-on and its iconURL guaranteed to exist, in which case, should we just fix the test so it passes a realistic object, and remove the && that copes with the addon being null/undefined?

Flags: needinfo?(mstriemer)
Flags: needinfo?(lgreco)
See Also: → 1724805
Blocks: 1544051
Depends on: 1724688
Keywords: leave-open
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9d3cf125f605 do not set an image attribute for synced tabs items in the synced tabs menupanel unless there is an icon to show, r=markh

Some addons may not include an icon (e.g. static themes addons) and so the abuse report panel should
fallback to the extensionGeneric.svg.

Falling back to the extensionGeneric.svg is also needed to prevent a diagnostic crash triggered by
loading non existing resources while running the abuse report mochitests.

(In reply to :Gijs (he/him) from comment #2)

Luca or Mark, the trypush is flagging up this:

https://searchfox.org/mozilla-central/rev/f71cb98fc35da418d2cb9ce31a0416d532dc9d69/toolkit/mozapps/extensions/content/abuse-report-panel.js#755

returns undefined in some cases, which means we try to load chrome://mozapps/content/extensions/undefined, which of course doesn't exist.

(from local running, the JS stack looks like this:

0 update() ["chrome://mozapps/content/extensions/abuse-report-panel.js":618:22]
    this = [object HTMLElement]
1 setAbuseReport(abuseReport = "[object Object]") ["chrome://mozapps/content/extensions/abuse-report-panel.js":642:11]
    this = [object HTMLElement]
2 <TOP LEVEL> ["chrome://mozapps/content/extensions/abuse-report-panel.js":864:5]

Is it expected the iconURL or add-on can be missing here sometimes, and in that case, should we load nothing or a fallback image of some sort? Or are both the add-on and its iconURL guaranteed to exist, in which case, should we just fix the test so it passes a realistic object, and remove the && that copes with the addon being null/undefined?

Hi Gijs,
I just looked into that and, even if the test is triggered by mock addons installed through the MockProvider (defined in head_abusereport.js, and I they do not have an iconURL), the scenario is actually legit: e.g. the static themes addons usually do not have an icon (in about:addons we do show a screenshot preview of the theme, but that doesn't fit in the current abuse report panel UI).

When the icon URL is missing, it would be reasonable to fallback to the extensionGeneric.svg file (as we do in some other parts of the UI when we have to show an addon icon and the addon does not have one).

I've attached a patch for doing that in D122207 (and verified locally that with this change browser_html_abuse_report.js doesn't trigger the MOZ_CRASH anymore as expected, and the generic icon seems to fit well in both dark and light themes, by being white when the abuse report panel is dark and black when the abuse report panel has a light white background).

Feel free to add the patch to your stack as is, or to commandeer the patch if you prefer.

(and let me know if there is any other addons-related test that is triggering this diagnostic crash, and I'll take a look asap).

Flags: needinfo?(mstriemer)
Flags: needinfo?(lgreco)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/9d5d2dc82665 fix various trivial dead references in product code, r=mossop
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/e4e3098eaf56 Abuse Report panel should fallback to extensionGeneric.svg on addons without an iconURL. r=Gijs
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f75f84ad84a5 work around avatar URL issues in test_fxaccounts_button.html, r=tgiles
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cc5556739c43 forget AddTask.js ever existed as bug 1544051 already removed it, r=bgrins
Depends on: 1721910
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/675fd489778c do not rely on images that only exist on macOS in devtools tests and fix MenuItem dummy image, r=mtigley
See Also: → 1725506
Depends on: 1698332
See Also: → 1725614

Depends on D122663

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c1f695ba3371 fake global.css for android reftests and crashtests, r=emilio https://hg.mozilla.org/integration/autoland/rev/aaecf2012cb0 skip some XUL-y tests on android, r=emilio,agi
Keywords: leave-open
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7fa060b566d6 put missing chrome/resource check from jar channels in a better place so we catch all cases, r=valentin

(In reply to Iulian Moraru from comment #25)

Backed out for causing failures on nsJARChannel.

Push with failures

Failure log for a11y failures
Failure log for gv-junit failures
Failure log for gv-junit-fis failures
Failure log for gv-junit-e10s-single failures

Backout link

Huh, clearly it's the tests you didn't know existed that get you - I ran what I thought would have been a pretty comprehensive trypush before landing: https://treeherder.mozilla.org/jobs?repo=try&revision=0372dbe2d3c9f31365675213d5ba0b52a47ad587

I'll look at these some more, but I'm out on PTO for most of the next 4 weeks so it may take me a while...

Flags: needinfo?(gijskruitbosch+bugs)
Severity: -- → S4
See Also: → 1766070
Attachment #9235483 - Attachment description: Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r?valentin → WIP: Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r?valentin
Depends on: 1808973
Depends on: 1808987
Depends on: 1808990
Depends on: 1808993
See Also: → 1809001
Attachment #9235483 - Attachment description: WIP: Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r?valentin → Bug 1724718 - put missing chrome/resource check from jar channels in a better place so we catch all cases, r?valentin,florian!
Depends on: 1809650
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/194aa5b57fa7 put missing chrome/resource check from jar channels in a better place so we catch all cases, r=valentin,florian,necko-reviewers

Backed out changeset 194aa5b57fa7 (Bug 1724718) for causing wpt failures on report-frame-ancestors-with-x-frame-options.sub.html and multiple other.
Backout link
Push with failures <--> wpt17
Failure Log
Also c1 Failure Log
Also wpt32 Failure Log
Also 3 Failure Log
Also C Failure Log
Also wpt16 Failure Log
Also 4 Failure Log
...

Flags: needinfo?(gijskruitbosch+bugs)
Depends on: 1810039
Depends on: 1810040

Ugh. Seems I need a more extensive try. Let's give that a shot: https://treeherder.mozilla.org/jobs?repo=try&revision=8027b3db6c1aa740712d00d9b8e79eb9ea292259

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to :Gijs (he/him) from comment #29)

Ugh. Seems I need a more extensive try. Let's give that a shot: https://treeherder.mozilla.org/jobs?repo=try&revision=8027b3db6c1aa740712d00d9b8e79eb9ea292259

... it'd help if it was (a) not an artifact try, and (b) on a more recent central. Let's try again: https://treeherder.mozilla.org/jobs?repo=try&revision=577591dbc57cb3bcb3acf9ca930618b4ae7eef8e

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e939a80b5b75 put missing chrome/resource check from jar channels in a better place so we catch all cases, r=valentin,florian,necko-reviewers
Depends on: 1810577
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/027ee4c52450 follow-up: add exemptions for more android-specific missing files. CLOSED TREE
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: