YunoHost-Apps / vaultwarden_ynh

Open source password management solutions for YunoHost
https://bitwarden.com/
GNU General Public License v3.0
58 stars 18 forks source link

Vaultwarden 404 when installed on pw.example.org instead of pw.example.org/vaultwarden #231

Closed utzer closed 1 year ago

utzer commented 1 year ago

Describe the bug

Vaultwarden 404 when installed on pw.example.org instead of pw.example.org/vaultwarden because of “Enable the small ‘YunoHost’ portal shortcut square on apps”. When “Enable the small ‘YunoHost’ portal shortcut square on apps” is disabled it still gives 404, but less faults in the Firefox console.

For details please see the related post in the Yunohost forum.

Context

Steps to reproduce

Alternative that works.

Faults for pw.example.org/ with “Enable the small ‘YunoHost’ portal shortcut square on apps” active:

ynh_portal.js:1     Failed to load resource: the server responded with a status of 403 ()
pw.example.org/:1 Refused to execute script from 'https://pw.example.org/ynh_portal.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
pw.example.org/:1 Refused to apply style from 'https://pw.example.org/ynh_overlay.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
custom_portal.js:1     Failed to load resource: the server responded with a status of 403 ()
pw.example.org/:1 Refused to execute script from 'https://pw.example.org/ynhtheme/custom_portal.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
pw.example.org/:1 Refused to apply style from 'https://pw.example.org/ynhtheme/custom_overlay.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
/favicon.ico:1     Failed to load resource: the server responded with a status of 404 ()
pw.example.org/:1 Refused to apply style from 'https://pw.example.org/ynh_overlay.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
pw.example.org/:1 Refused to apply style from 'https://pw.example.org/ynhtheme/custom_overlay.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Faults for pw.example.org/ with “Enable the small ‘YunoHost’ portal shortcut square on apps” NOT active: /favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()

Tried to put a favicon.ico in /var/www/vaultwarden/favicon.ico, but that leaves me with:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
pw.example.org/:1     GET https://pw.example.org/ 404

Journalctl:

Apr 21 11:31:03 vaultwarden[1275855]: [2023-04-21 11:31:03.694][rocket::server::_][ERROR] No matching routes for GET / text/html.
Apr 21 11:31:03 vaultwarden[1275855]: [2023-04-21 11:31:03.694][rocket::server::_][WARN] No 404 catcher registered. Using Rocket default.

/var/log/vaultwarden/vaultwarden.log:

[2023-04-21 11:31:03.694][rocket::server::_][ERROR] No matching routes for GET / text/html.
[2023-04-21 11:31:03.694][rocket::server::_][WARN] No 404 catcher registered. Using Rocket default.

Expected behavior

Vaultwarden loads and does not 404.

Logs

I can provide whatever log you like, but surely the Journalctl and vaultwarden.log do not contain anything helpful, I think there is a wrong setup of the webserver during the installation, it should catch the favicon.ico call and it should catch the requests regarding the shortcut square, so I guess someone has to fix that, I would be very happy to help and provide the information needed.

utzer commented 1 year ago

Which information can I add here to help solve this bug?

utzer commented 1 year ago

Is there anyone here reading these issues and is this Yunohost Application still maintained?

utzer commented 1 year ago

Nothing?

BoFFire commented 1 year ago

Hi, I tried to reproduce the problem same as @utzer and I confirm that there's a bug somewhere in the install.

Cc @tituspijean @yalh76 Can you check this thread : https://social.yl.ms/display/e18176ef-1164-4770-d74c-874820190205

eldertek commented 1 year ago

Same for me

Tagadda commented 1 year ago

I'm not able to reproduce this issue nowadays.