Closed Bug 1651807 Opened 4 years ago Closed 4 years ago

resource:///modules/BrowserGlue.jsm, line 1290: NS_ERROR_FILE_NOT_FOUND on startup in local builds because pdfjs moved

Categories

(Firefox :: PDF Viewer, defect)

defect

Tracking

()

RESOLVED FIXED
Firefox 80
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox78 --- unaffected
firefox79 --- unaffected
firefox80 --- fixed

People

(Reporter: zbraniecki, Unassigned)

References

(Regression)

Details

(Keywords: regression)

When starting a self-built browser on linux (arch) with a fresh profile, I see:

~/projects/mozilla-unified (central)                                                                                  
▶ ./mach run                                            
 0:00.38 /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/dist/bin/firefox -no-remote -profile /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/tmp/profile-default
JavaScript error: resource:///modules/BrowserGlue.jsm, line 1290: NS_ERROR_FILE_NOT_FOUND
console.error: SearchCache: "_readCacheFile: Error reading cache file:" (new Error("", "(unknown module)"))

The UI is mostly unresponsive.

When I comment out https://searchfox.org/mozilla-central/rev/8d55e18875b89cdf2a22a7cba60dc40999c18356/browser/components/BrowserGlue.jsm#1289-1291 and rebuild, the browser works.

What's your mozconfig? Do you disable pdfjs or something? Does loading the pdfjs jsm in a browser tab work after you comment out that code?

Flags: needinfo?(gandalf)
mk_add_options MOZ_MAKE_FLAGS="-j16"

ac_add_options --with-ccache='/home/zbraniecki/.mozbuild/sccache/sccache'
ac_add_options --disable-cargo-incremental

CC="/home/zbraniecki/.mozbuild/clang/bin/clang"
CXX="/home/zbraniecki/.mozbuild/clang/bin/clang++"

RUSTC="/home/zbraniecki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc"
CARGO="/home/zbraniecki/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo"

mk_add_options AUTOCLOBBER=1

# Optimize
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@-opt
ac_add_options --enable-release
ac_add_options --enable-official-branding
Flags: needinfo?(gandalf)

Does loading the pdfjs jsm in a browser tab work after you comment out that code?

Nope, after I comment it out and try to open a PDF file in Firefox it errors with:

 0:00.38 /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/dist/bin/firefox -no-remote -profile /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/tmp/profile-default
JavaScript error: resource:///modules/BrowserGlue.jsm, line 1133: NS_ERROR_FILE_NOT_FOUND
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 

(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #3)

Does loading the pdfjs jsm in a browser tab work after you comment out that code?

Nope, after I comment it out and try to open a PDF file in Firefox it errors with:

 0:00.38 /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/dist/bin/firefox -no-remote -profile /projects/mozilla-unified/obj-x86_64-pc-linux-gnu-opt/tmp/profile-default
JavaScript error: resource:///modules/BrowserGlue.jsm, line 1133: NS_ERROR_FILE_NOT_FOUND
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 
JavaScript error: resource://gre/modules/pdfjs.js, line 29: NS_ERROR_FILE_NOT_FOUND: 

That's not really what I meant, sorry. I meant, if you try to open resource://pdf.js/PdfJs.jsm in a tab, what happens?

Flags: needinfo?(gandalf)

File not found
Firefox can’t find the file at /projects/mozilla-unified/browser/extensions/pdfjs/content/PdfJs.jsm.

Flags: needinfo?(gandalf)

I don't know why your build's symlinks are out of date, maybe it needs a clobber, but bug 1618465 moved this stuff to toolkit.

Component: General → PDF Viewer
Regressed by: 1618465
Has Regression Range: --- → yes

I can confirm that clobber fixes the bug.

I just ran into this myself. I wonder why it doesn't affect infra builds. :Standard8, any idea what's going on here?

FWIW, a quicker resolution than clobbering is to run:

rm -rf path/to/objdir/dist/bin/browser/chrome/pdfjs

followed by ./mach build faster.

Flags: needinfo?(standard8)
Summary: resource:///modules/BrowserGlue.jsm, line 1290: NS_ERROR_FILE_NOT_FOUND on startup → resource:///modules/BrowserGlue.jsm, line 1290: NS_ERROR_FILE_NOT_FOUND on startup in local builds because pdfjs moved

Well that directory moved from browser to toolkit, so I guess it would be something like the build system didn't cope with that properly - probably the jar.mn move due to the non-browser/toolkit specific resource URI.

We could bump the CLOBBER file? Though I'm not sure it is worth it now after a week, though clobber hasn't been touched since the merge, so maybe?

Flags: needinfo?(standard8)

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

FWIW, I just ran into this locally today - running the browser was working, but running any WPT or reftests locally was hanging with the error above.

The steps in https://bugzilla.mozilla.org/show_bug.cgi?id=1651807#c8 resolved this.

Bumping the CLOBBER file seems like it'd be worthwhile doing.

(In reply to Mark Banner (:standard8) (afk until 20 July) from comment #9)

Well that directory moved from browser to toolkit, so I guess it would be something like the build system didn't cope with that properly - probably the jar.mn move due to the non-browser/toolkit specific resource URI.

We could bump the CLOBBER file? Though I'm not sure it is worth it now after a week, though clobber hasn't been touched since the merge, so maybe?

Sebastian, who makes a call about touching CLOBBER for stuff like this?

Flags: needinfo?(aryx.bugmail)
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/mozilla-central/rev/972da45e496b
CLOBBER because build system regards file as missing which got moved in bug 1618465. DONTBUILD a=clobber
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(aryx.bugmail)
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80
You need to log in before you can comment on or make changes to this bug.