./mach build fails with "[webpack-cli] TypeError: Cannot read properties of undefined (reading 'tap')"
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr140 unaffected, firefox-esr153 unaffected, firefox156 unaffected, firefox157 fixed, firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox156 | --- | unaffected |
| firefox157 | --- | fixed |
| firefox158 | --- | fixed |
People
(Reporter: dholbert, Assigned: ahochheiden)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 external files)
STR:
- Have this mozconfig (not sure yet if any of it is necessary to trigger the issue; it just happens to be what I'm using):
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-artifact
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-artifact-builds
- Run
./mach build
ACTUAL RESULTS:
Build fails, with this warning (W) and error (E) output:
0:21.93 Elapsed: 0.00s; From /scratch/work/builds/git-firefox/obj-artifact/dist/bin/moz-src/toolkit/modules: Kept 0 existing; Added/updated 7; Removed 0 files and 0 directories.
0:22.44 W [webpack-cli] TypeError: Cannot read properties of undefined (reading 'tap')
0:22.44 W at BannerPlugin.apply (/scratch/work/builds/git-firefox/firefox/third_party/node/node_modules/webpack/lib/BannerPlugin.js:85:27)
0:22.44 W at createCompiler (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/webpack.js:76:12)
0:22.44 W at /scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/webpack.js:44:48
0:22.44 W at Array.map (<anonymous>)
0:22.44 W at createMultiCompiler (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/webpack.js:44:33)
0:22.44 W at create (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/webpack.js:134:16)
0:22.44 W at webpack (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/webpack.js:151:47)
0:22.44 W at WebpackCLI.f [as webpack] (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack/lib/index.js:72:16)
0:22.44 W at WebpackCLI.createCompiler (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack-cli/lib/webpack-cli.js:2191:23)
0:22.44 W at async WebpackCLI.runWebpack (/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/node_modules/webpack-cli/lib/webpack-cli.js:2321:16)
0:22.45 E Traceback (most recent call last):
0:22.45 E File "<frozen runpy>", line 198, in _run_module_as_main
0:22.45 E File "<frozen runpy>", line 88, in _run_code
0:22.45 E File "/scratch/work/builds/git-firefox/firefox/python/mozbuild/mozbuild/action/file_generate.py", line 156, in <module>
0:22.45 E sys.exit(main(sys.argv[1:]))
0:22.45 E ~~~~^^^^^^^^^^^^^^
0:22.45 E File "/scratch/work/builds/git-firefox/firefox/python/mozbuild/mozbuild/action/file_generate.py", line 100, in main
0:22.45 E ret = module.__dict__[method](
0:22.45 E output, *args.additional_arguments, **kwargs
0:22.45 E )
0:22.46 E File "/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/build-newtab-bundles.py", line 127, in generate_js
0:22.46 E _run(
0:22.46 E ~~~~^
0:22.46 E [
0:22.46 E ^
0:22.46 E ...<9 lines>...
0:22.46 E extra_env={"MOZ_WEBPACK_DEPS": deps_file},
0:22.46 E ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0:22.46 E )
0:22.46 E ^
0:22.46 E File "/scratch/work/builds/git-firefox/firefox/browser/extensions/newtab/build-newtab-bundles.py", line 113, in _run
0:22.46 E raise Exception(f"{argv[1]} failed with exit code {result.returncode}")
0:22.47 E Exception: /scratch/work/builds/git-firefox/firefox/third_party/node/node_modules/webpack/bin/webpack.js failed with exit code 2
0:22.48 E gmake[4]: *** [Makefile:4479: /scratch/work/builds/git-firefox/obj-artifact/browser/extensions/newtab/data/content/.deps/vendor.bundle.js.stub] Error 1
0:22.48 E gmake[4]: *** Waiting for unfinished jobs....
I'm on Ubuntu 26.04.
This issue started with bug 2065363's commits, which landed earlier today and added the BannerPlugin.js file (for example) that's listed in the error output.
If I check out a commit from before that bug landed -- e.g. https://github.com/mozilla-firefox/firefox/commit/a21581710910 -- then I can build successfully.
| Reporter | ||
Comment 1•1 month ago
|
||
I tried running ./mach bootstrap in case this bug was just a sign that I needed to update some piece of my toolchain, but it didn't help.
| Assignee | ||
Comment 2•1 month ago
|
||
rm -rf browser/extensions/newtab/node_modules should fix it. Should only happen once for anyone that ran specific new tab commands.
| Reporter | ||
Comment 3•1 month ago
|
||
Yup, confirmed -- that folder-deletion did fix the issue for me (and yes, I have run specific new-tab engineering commands in the past). Thanks!
(Not sure whether to consider this "fixed" or not; I'll let you close in whatever way makes sense.)
| Assignee | ||
Comment 4•1 month ago
|
||
Updated•1 month ago
|
Updated•1 month ago
|
Comment 7•1 month ago
|
||
Set release status flags based on info from the regressing bug 2065363
Comment 8•1 month ago
|
||
| bugherder | ||
Comment 9•1 month ago
|
||
The patch landed in nightly and beta is affected.
:ahochheiden, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox157towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 10•1 month ago
|
||
It's possible somebody will hit this on beta, an uplift wouldn't hurt.
| Assignee | ||
Comment 11•1 month ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D325087
Updated•1 month ago
|
Comment 12•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: None for users, the change only affects the build. Developers who ever ran the newtab npm commands have a stale browser/extensions/newtab/node_modules, and on beta
./mach buildthen fails with[webpack-cli] TypeError: Cannot read properties of undefined (reading 'tap'). - Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: One environment variable added to the webpack-cli subprocess environment.
- String changes made/needed?: None.
- Is Android affected?: no
Comment 13•1 month ago
|
||
fwiw i can confirm that rm -rf browser/extensions/newtab/node_modules fixes my builders, they're slowly all coming back green (beta,central..)
Updated•1 month ago
|
Updated•1 month ago
|
Comment 14•1 month ago
|
||
| uplift | ||
Description
•