Closed Bug 1786667 Opened 2 years ago Closed 2 years ago

Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs

Categories

(Toolkit :: Application Update, defect, P2)

Firefox 104
defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- wontfix
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: beland, Assigned: bytesized)

References

Details

(Keywords: regression, Whiteboard: [fidedi-ope])

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

Run "firefox" on the command line, with or without "export MOZ_ENABLE_WAYLAND=1"

This is on Ubuntu 24.04.1 LTS, which uses snap to package Firefox.

Actual results:

Printed on console:
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs

Expected results:

No errors

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

Component: Untriaged → WebRTC
Product: Firefox → Core
Component: WebRTC → Application Update
Product: Core → Toolkit

This looks like an error in porting from ChromeUtils (.jsm) to Javascript modules (.sys.mjs). That said the file in question hasn't been ported yet and I can't find any signs for importing UpdateListener as a Javascript module in the Firefox 104 repository.

:bytesized How would one go about triaging this?

Flags: needinfo?(bytesized)

Is anything actually broken? Or just a message printed to the console?

Flags: needinfo?(bytesized) → needinfo?(beland)

Hello! I wanted to add that I am also seeing this bug on Ubuntu using the snap package for firefox. (Others are too, e.g. see this Reddit thread.)

Ubuntu version is 22.04.1 (Jammy Jellyfish):

$ lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

Firefox version is 104.0.2:

$ firefox --version
Mozilla Firefox 104.0.2

Firefox was randomly crashing, so to debug I was running it in the command line so I could see if any messages would clue me into why it was crashing, and I saw these messages appear when the browser crashed (to answer Kirk Steuber's question - I am seeing the browser crash in association with these error messages):

Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
Sandbox: Unexpected EOF, op 0 flags 00 path /proc/cpuinfo

Let me know if there is anything I can do to help!

(In reply to Kirk Steuber (he/him) [:bytesized] from comment #3)

Is anything actually broken? Or just a message printed to the console?

See my comment above - I am seeing the browser crash when these messages occur. They seem semi-random, haven't figured out what might be triggering them.

The error message is printed by compatibility layer around ESMification, in bug 1766761. the details are the following:

When some code tries to import resource://gre/modules/UpdateListener.jsm, and if the file is not found,
the system automatically redirects the load to resource://gre/modules/UpdateListener.sys.mjs, assuming the file is already ESMified, leaving the consumer keeps using the old JSM URI.
Previously, the "Missing chrome or resource URL" message has been printed at the point of the load for UpdateListener.jsm fails, but the compatibility layer changed the behavior and now the message is printed at the point of the redirected load for UpdateListener.sys.mjs fails.

So, the actual issue is that resource://gre/modules/UpdateListener.jsm is missing.
Sorry for the confusing error message. I'll make the error message clearer.

See Also: → 1789543

Ah, thank you :arai, I was quite hung up on the unusual filename. Now that I know that's a red herring, I think that I understand the problem. I'm pretty sure that Ubuntu builds Firefox without MOZ_UPDATER, which means that many updater files, including UpdateListener wouldn't be included in the build. But BrowserGlue's inclusion of UpdateListener does not appear to be gated on MOZ_UPDATER in the same way.

I'll try to get this fixed quickly.

Severity: -- → S2
Flags: needinfo?(beland)
Priority: -- → P2
Whiteboard: [fidedi-ope]

I'm able to reproduce some similar looking error messages. But I cannot reproduce any crashing behavior. But this ought to be fixed either way. I should have a patch up shortly.

This patch was made to guard Update functionality from being called in BrowserGlue.jsm if Firefox was not built with support for the Updater. However, it also ended up touching the updater build configuration. I discovered while testing this patch that building with --disable-updater does not imply --disable-maintenance-service or --disable-update-agent. So I fixed that issue as well. Once that was fixed, I could change some other code that checked AppConstants.MOZ_UPDATER && AppConstants.MOZ_UPDATE_AGENT since that is now equivilant to AppConstants.MOZ_UPDATE_AGENT.

Assignee: nobody → bytesized
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ksteuber@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6bb12ecf8c5
Don't access update components in BrowserGlue if Firefox was not built with support for them r=bhearsum,preferences-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

This looks like it was regressed by bug 1765418 in Firefox 101.

The patch landed in nightly and beta is affected.
:bytesized, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox105 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(bytesized)

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #13)

:bytesized, is this bug important enough to require an uplift?

I'm inclined to say no unless we are able to confirm that this is causing a crash.

Flags: needinfo?(bytesized)
QA Whiteboard: [qa-106b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: