Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the Web UI fails for unclear reasons. #463

Open
ColonelThirtyTwo opened this issue Sep 8, 2024 · 6 comments
Open

Building the Web UI fails for unclear reasons. #463

ColonelThirtyTwo opened this issue Sep 8, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ColonelThirtyTwo
Copy link

ColonelThirtyTwo commented Sep 8, 2024

Describe the bug
npm run build in webui returns exit status 1 for unclear reasons. The only error messages involve some outdated dependencies, which should not affect the build. I'm unsure if the build actually succeeded.

This breaks the Arch Linux AUR package for backrest, but is not specific to the AUR package. The maintainer of the package recommended downgrading node, so it may be version specific.

To Reproduce

On a fresh checkout of backrest, cd to webui run npm install, then run npm run build and observe its exit code.

Expected behavior
Backrest's UI builds successfully and reports a successful exit code.

Screenshots

col@nas ~/b/webui (main)> npm run build

> [email protected] build
> cross-env UI_OS=unix parcel build src/index.html --public-url ./

(node:1470967) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⠹ Building index.html...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
⠦ Building index.js...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
⠋ Bundling...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
⠸ Building runtime-4872001e1276c5ff.js...
col@nas ~/b/webui (main) [1]> echo $status
1
col@nas ~/b/webui (main)> node --version
v22.8.0
col@nas ~/b/webui (main)> npm --version
10.8.3

Platform Info

  • Arch Linux
  • Backrest commit a28639a (current HEAD as of writing)
  • Node version 22.8.0
  • NPM version 10.8.3

Additional context

@ColonelThirtyTwo ColonelThirtyTwo added the bug Something isn't working label Sep 8, 2024
@garethgeorge
Copy link
Owner

Hmm, I've gone ahead and updated dependencies in 8ba6ece

Not sure if that'll make a difference. More broadly, I'm surprised that the AUR is building the webui from source. It'd probably be better for Backrest to be publishing an AUR that uses published binaries.

I may need to coordinate with the AUR maintainer to adopt it / see if we can switch over to using goreleaser's aur support https://goreleaser.com/customization/aur/ .

@ColonelThirtyTwo
Copy link
Author

Most AUR packages build from source. The ones that don't have a -bin suffix.

@garethgeorge
Copy link
Owner

garethgeorge commented Sep 9, 2024

Ah, thanks for the context. Okay -- I should be able to start publishing one in that case if someone is interested to help me test it. I don't have an arch linux test device.

Also happy to try to help debug the current failure but I can't really tell from the error message posted, the webui builds successfully in CI so it may be worth looking at that environment.

@ColonelThirtyTwo
Copy link
Author

Found something - node dumps core apparently. Only found it in the journald logs. Something in lightningcss apparently.

Sep 09 20:52:08 col-desktop-linux systemd-coredump[96907]: [🡕] Process 96818 (node) of user 1000 dumped core.
                                                           
                                                           Module /home/col/Downloads/backrest/webui/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node without build-id.
                                                           Module /home/col/Downloads/backrest/webui/node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node
                                                           Stack trace of thread 96839:
                                                           #0  0x0000742c62b7b80c n/a (libc.so.6 + 0x16c80c)
                                                           #1  0x00005618abf64812 n/a (node + 0xb64812)
                                                           #2  0x00005618ace8d6e2 n/a (node + 0x1a8d6e2)
                                                           #3  0x00005618ace8b8de n/a (node + 0x1a8b8de)
                                                           #4  0x00005618ace894dc n/a (node + 0x1a894dc)
                                                           #5  0x00005618ace89203 n/a (node + 0x1a89203)
                                                           #6  0x00005618ac3aa80c n/a (node + 0xfaa80c)
                                                           #7  0x00005618ac3ab6fb _ZN2v88internal9Execution4CallEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_iPS6_ (node + 0xfab6fb)
                                                           #8  0x00005618ac25ab88 _ZN2v86Object14CallAsFunctionENS_5LocalINS_7ContextEEENS1_INS_5ValueEEEiPS5_ (node + 0xe5ab88)
                                                           #9  0x00005618ac07aae5 _ZN4node6serdes19DeserializerContext14ReadHostObjectEPN2v87IsolateE (node + 0xc7aae5)
                                                           #10 0x00005618ac77ec2c _ZN2v88internal17ValueDeserializer14ReadHostObjectEv (node + 0x137ec2c)
                                                           #11 0x00005618ac783d13 _ZN2v88internal17ValueDeserializer18ReadObjectInternalEv (node + 0x1383d13)
                                                           #12 0x00005618ac784256 _ZN2v88internal17ValueDeserializer10ReadObjectEv (node + 0x1384256)
                                                           #13 0x00005618ac784c0e _ZN2v88internal17ValueDeserializer22ReadJSObjectPropertiesENS0_6HandleINS0_8JSObjectEEENS0_16SerializationTagEb (node + 0x1384c0e)
                                                           #14 0x00005618ac784f97 _ZN2v88internal17ValueDeserializer12ReadJSObjectEv (node + 0x1384f97)
                                                           #15 0x00005618ac783dc0 _ZN2v88internal17ValueDeserializer18ReadObjectInternalEv (node + 0x1383dc0)
                                                           #16 0x00005618ac784256 _ZN2v88internal17ValueDeserializer10ReadObjectEv (node + 0x1384256)
                                                           #17 0x00005618ac78447c _ZN2v88internal17ValueDeserializer22ReadJSObjectPropertiesENS0_6HandleINS0_8JSObjectEEENS0_16SerializationTagEb (node + 0x138447c)
                                                           #18 0x00005618ac784f97 _ZN2v88internal17ValueDeserializer12ReadJSObjectEv (node + 0x1384f97)
                                                           #19 0x00005618ac783dc0 _ZN2v88internal17ValueDeserializer18ReadObjectInternalEv (node + 0x1383dc0)
                                                           #20 0x00005618ac784256 _ZN2v88internal17ValueDeserializer10ReadObjectEv (node + 0x1384256)
                                                           #21 0x00005618ac784c0e _ZN2v88internal17ValueDeserializer22ReadJSObjectPropertiesENS0_6HandleINS0_8JSObjectEEENS0_16SerializationTagEb (node + 0x1384c0e)
                                                           #22 0x00005618ac784f97 _ZN2v88internal17ValueDeserializer12ReadJSObjectEv (node + 0x1384f97)
                                                           #23 0x00005618ac783dc0 _ZN2v88internal17ValueDeserializer18ReadObjectInternalEv (node + 0x1383dc0)
                                                           #24 0x00005618ac784256 _ZN2v88internal17ValueDeserializer10ReadObjectEv (node + 0x1384256)
                                                           #25 0x00005618ac78447c _ZN2v88internal17ValueDeserializer22ReadJSObjectPropertiesENS0_6HandleINS0_8JSObjectEEENS0_16SerializationTagEb (node + 0x138447c)
                                                           #26 0x00005618ac784f97 _ZN2v88internal17ValueDeserializer12ReadJSObjectEv (node + 0x1384f97)
                                                           #27 0x00005618ac783dc0 _ZN2v88internal17ValueDeserializer18ReadObjectInternalEv (node + 0x1383dc0)
                                                           #28 0x00005618ac784256 _ZN2v88internal17ValueDeserializer10ReadObjectEv (node + 0x1384256)
                                                           #29 0x00005618ac785cb1 _ZN2v88internal17ValueDeserializer17ReadObjectWrapperEv (node + 0x1385cb1)
                                                           #30 0x00005618ac2611bf _ZN2v817ValueDeserializer9ReadValueENS_5LocalINS_7ContextEEE (node + 0xe611bf)
                                                           #31 0x00005618ac07b431 _ZN4node6serdes19DeserializerContext9ReadValueERKN2v820FunctionCallbackInfoINS2_5ValueEEE (node + 0xc7b431)
                                                           #32 0x00005618ace8d6e2 n/a (node + 0x1a8d6e2)
                                                           #33 0x00005618ace8b8de n/a (node + 0x1a8b8de)
                                                           #34 0x00005618ace8b8de n/a (node + 0x1a8b8de)
                                                           #35 0x00005618ace8b8de n/a (node + 0x1a8b8de)
                                                           #36 0x000056186d28e4ce n/a (n/a + 0x0)
                                                           #37 0x000056186d1feac9 n/a (n/a + 0x0)
                                                           #38 0x000056186d225c5e n/a (n/a + 0x0)
                                                           #39 0x000056186d193703 n/a (n/a + 0x0)
                                                           #40 0x00005618ace894dc n/a (node + 0x1a894dc)
                                                           #41 0x00005618ace89203 n/a (node + 0x1a89203)
                                                           #42 0x00005618ac3aa80c n/a (node + 0xfaa80c)
                                                           #43 0x00005618ac3ab6fb _ZN2v88internal9Execution4CallEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_iPS6_ (node + 0xfab6fb)
                                                           #44 0x00005618ac25ab88 _ZN2v86Object14CallAsFunctionENS_5LocalINS_7ContextEEENS1_INS_5ValueEEEiPS5_ (node + 0xe5ab88)
                                                           #45 0x00005618abe899ec _ZN4node20InternalMakeCallbackEPNS_11EnvironmentEN2v85LocalINS2_6ObjectEEES5_NS3_INS2_8FunctionEEEiPNS3_INS2_5ValueEEENS_13async_contextES9_ (node + 0xa899ec)
                                                           #46 0x00005618abea3f03 _ZN4node9AsyncWrap12MakeCallbackEN2v85LocalINS1_8FunctionEEEiPNS2_INS1_5ValueEEE (node + 0xaa3f03)
                                                           #47 0x00005618ac0033fc _ZN4node6worker11MessagePort9OnMessageENS1_21MessageProcessingModeE (node + 0xc033fc)
                                                           #48 0x0000742c63dc5a1b n/a (libuv.so.1 + 0x9a1b)
                                                           #49 0x0000742c63de330a n/a (libuv.so.1 + 0x2730a)
                                                           #50 0x0000742c63dcb09f uv_run (libuv.so.1 + 0xf09f)
                                                           #51 0x00005618abe8af57 _ZN4node21SpinEventLoopInternalEPNS_11EnvironmentE (node + 0xa8af57)
                                                           #52 0x00005618ac0f79b9 _ZN4node6worker6Worker3RunEv (node + 0xcf79b9)
                                                           #53 0x00005618ac0f7f5b n/a (node + 0xcf7f5b)
                                                           #54 0x0000742c62aa339d n/a (libc.so.6 + 0x9439d)
                                                           #55 0x0000742c62b2849c n/a (libc.so.6 + 0x11949c)
                                                           
                                                           Stack trace of thread 96899:
                                                           #0  0x0000000000000000 n/a (n/a + 0x0)
                                                           ELF object binary architecture: AMD x86-64

@falappas
Copy link

It is related of node package version, downgrading to nodejs-22.6 the compilation end successful.

@garethgeorge
Copy link
Owner

Thanks for taking a look at this / actually tracking it down to a parcel-bundler issue. Pretty interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants