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

dietpi-software: snapweb snapcast server invalid web root #7073

Closed
hllhll opened this issue May 14, 2024 · 6 comments
Closed

dietpi-software: snapweb snapcast server invalid web root #7073

hllhll opened this issue May 14, 2024 · 6 comments
Labels
Bug 🐞 RISC-V All RISC-V platform related Solution available 🥂 Definite solution has been done
Milestone

Comments

@hllhll
Copy link

hllhll commented May 14, 2024

Required Information

  • DietPi version - 9.3.0
  • Distro version - bookworm
  • Kernel version - Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • SBC model - RPi 4 Model B (aarch64)

Additional Information (if applicable)

  • DietPi-Software: snapcast server
  • Software installed freshly, The issue most likely reproducible with a fresh install (as I did)

Steps to reproduce

Install snapcast server using dietpi-software
navigate to http://<host>:1780

Expected behaviour

snapweb should load

Actual behaviour

Web page reports an error:

The resource '/' was not found.

Extra details

Looks like the path to the www document root should contain a file named index.html; Default path configured during installation is /usr/share/snapserver/snapweb which doesn't exist. index file seem to be in /usr/share/snapserver/index.html

I Will probably fix it on my own and perform a PR, eventually :)

@MichaIng MichaIng added Question ❔ External bug 🐞 For bugs which are not caused by DietPi. and removed Question ❔ labels May 14, 2024
@MichaIng MichaIng added this to the v9.5 milestone May 14, 2024
@MichaIng
Copy link
Owner

Hmm, snapweb is not included in this package anymore:

root@VM-Bookworm:~# l /usr/share/snapserver/
total 8.0K
-rw-r--r-- 1 root root 1.7K Dec 22  2021 index.html
drwxr-xr-x 2 root root 4.0K May 14 17:58 plug-ins

Using /usr/share/snapserver just shows a generic default page, stating

The Snapserver installation should include a copy of Snapweb, located in /usr/share/snapserver/snapweb/

which is obviously not true. Not sure whether this is intended or a packaging bug in the latest version.

@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed External bug 🐞 For bugs which are not caused by DietPi. labels May 14, 2024
@MichaIng MichaIng modified the milestones: v9.5, v9.4 May 14, 2024
@hllhll
Copy link
Author

hllhll commented May 14, 2024

Under my setup, which package would the dietpi-software installer use?
I've looked into snapcast_0.28.0_amd64-debian-bookworm.zip and it's there in usr/share/snapserver/snapweb)

@MichaIng
Copy link
Owner

MichaIng commented May 14, 2024

Ah lol, my testing VM was at DietPi v9.3 as well. Please update to latest version and reinstall it:

dietpi-software reinstall 191

The latest Snapcast release added packages which support Debian Bookworm. Before that, we installed the packages from Debian themselves on Bookworm, which indeed do not include snapweb (anymore).

@MichaIng MichaIng added RISC-V All RISC-V platform related Bug 🐞 labels May 14, 2024
MichaIng added a commit that referenced this issue May 14, 2024
- DietPi-Software | Snapcast Server: Resolved on issue where on RISC-V systems, the web interface was not available, since it is not included in the "snapserver" package from Debian. Many thanks to @hllhll for reporting this issue: #7073
@hllhll
Copy link
Author

hllhll commented May 14, 2024

Due to some wired permission issues, I hade to uninstall and reinstall in addition to that, but now it works, Thanks!

@hllhll hllhll closed this as completed May 14, 2024
@MichaIng
Copy link
Owner

MichaIng commented May 14, 2024

Since it is still relevant for RISC-V, I just fixed it, installing snapweb in those cases where we install the Debian package: 2b34d77

Now I understand why it was disabled OOTB in Debian's snapsever.conf. It was removed from the Debian package, since it relies (or relied) on a JavaScript library, for which the source code is missing. Libflac.js to be precise. Checking back at current sources, this is installed as Node dependency: https://github.com/badaix/snapweb/blob/develop/package.json
And the source code is perfectly available: https://www.npmjs.com/package/libflacjs/v/5.0.0 => https://github.com/mmig/libflac.js

Indeed this changed in the meantime: badaix/snapweb#46
So Debian could re-add it to their package.

EDIT: For the record: badaix/snapweb#82

@MichaIng MichaIng modified the milestones: v9.4, v9.5 May 14, 2024
MichaIng added a commit that referenced this issue May 14, 2024
- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: #7073
MichaIng added a commit that referenced this issue May 14, 2024
- DietPi-Software | Snapcast Server: Resolved an issue where on Bookworm systems, which installed the Snapcast Server before DietPi v9.4 and reinstalled it afterwards, the server failed to start due to a permissions issue, since the services of both packages use different users. Many thanks to @hllhll for reporting this issue: #7073
@MichaIng
Copy link
Owner

I also found the weird permissions issue. It is since the Debian package uses the _snapserver user, and the badaix package uses the snapserver user. Weird unnecessary difference, IMO. When upgrading from the Debian to badaix package or the other way round, the other respective user will remain on the system, also after purging the package.

Both addressed here: 0091219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 RISC-V All RISC-V platform related Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants