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

After login, nothing happens (thunderhub shows login page again). Error on server, but only when run in background. #581

Open
kkoenen opened this issue Oct 29, 2023 · 1 comment

Comments

@kkoenen
Copy link

kkoenen commented Oct 29, 2023

Describe the problem/bug
Thunderhub works as expected, when started using "npm start" or "npm run start". But when starting the same command from a service (/etc/systemd/system/thunderhub.service), the application doesn't work (after login, same login screen is presented). Server shows error below.

Oct 29 16:54:17 toby-nuc npm[25743]: ReferenceError: window is not defined
Oct 29 16:54:17 toby-nuc npm[25743]:     at /home/*****/thunderhub/src/client/.next/server/chunks/1010.js:14:70826
Oct 29 16:54:17 toby-nuc npm[25743]:     at Object.75015 (/home/*****/thunderhub/src/client/.next/server/chunks/1010.js:14:71234)
Oct 29 16:54:17 toby-nuc npm[25743]:     at __webpack_require__ (/home/*****/thunderhub/src/client/.next/server/webpack-runtime.js:1:145)
Oct 29 16:54:17 toby-nuc npm[25743]:     at Object.79577 (/home/*****/thunderhub/src/client/.next/server/chunks/1010.js:1:426143)
Oct 29 16:54:17 toby-nuc npm[25743]:     at __webpack_require__ (/home/*****/thunderhub/src/client/.next/server/webpack-runtime.js:1:145)
Oct 29 16:54:17 toby-nuc npm[25743]:     at Object.20175 (/home/*****/thunderhub/src/client/.next/server/chunks/1010.js:1:327766)
Oct 29 16:54:17 toby-nuc npm[25743]:     at __webpack_require__ (/home/*****/thunderhub/src/client/.next/server/webpack-runtime.js:1:145)
Oct 29 16:54:17 toby-nuc npm[25743]:     at Object.83654 (/home/*****/thunderhub/src/client/.next/server/chunks/1010.js:1:337077)
Oct 29 16:54:17 toby-nuc npm[25743]:     at __webpack_require__ (/home/*****/thunderhub/src/client/.next/server/webpack-runtime.js:1:145)
Oct 29 16:54:17 toby-nuc npm[25743]:     at Object.99357 (/home/*****/thunderhub/src/client/.next/server/chunks/1010.js:1:357338)

Your environment

  • Version of ThunderHub: 0.13.23
  • Deployment method: installation (npm), start by hand (no problem), start by systemd (error).
  • Other relevant environment details: tried with node 16, 18 and 21.

To Reproduce
Steps to reproduce the behavior:
start thunderhub by using systemd. login. error.

.service file:

[Unit]
Description=Thunderhub
Wants=lnd.service
After=lnd.service

[Service]
User=*****
WorkingDirectory=/home/*****/thunderhub
ExecStart=/usr/bin/npm run start
Restart=on-failure
TimeoutSec=120
RestartSec=30

[Install]
WantedBy=multi-user.target

Expected behavior
Normal operation of thunderhub.

Actual behavior
After login, server shows "ReferenceError: window is not defined" error and UI shows login-screen.

@kkoenen
Copy link
Author

kkoenen commented Nov 8, 2023

After trying different versions of npm and node, no fix. So I decided to move back to Thunderhub v0.13.20 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant