Vaultwarden 404 when installed in pw.example.org instead of pw.example.org/vaultwarden

Hello,
I had Vaultwarden installed previously, it was available on pw.example.org/vaultwarden, now I wanted to use pw.example.org, so I removed the application and installed it again, just with the new domain and /.

So now I get a 404.

I uninstalled the application again and installed it again on pw.example.org/ and still 404.

The I uninstalled it again, removed the domain, added the domain again, installed Vaultwarden again on pw.example.org, still 404.

Uninstalled Vaultwarden and installed it again on pw.example.org/vaultwarten, that works.

Why?
Could there be some remains somewhere? I deleted the browsers cache/website data, I used a different browser that does not retain any data after closing. I am a bit puzzled.

YunoHost 11.1.15 (stable)

It works well for me on a newly created domain and installation of Vaultwarden on its root. It might be possible that your browser has kept in memory that it should go directly from pw.example.org/ to pw.example.org/vaultwarden. Can you try again after deleting your browser cache? In Firefox I think it’s even needed to “Forget this site” in the browsing history menu.

If it’s still not working, can you open your browser console (F12 key) and share which address is triggering the 404 error?

As I wrote the browser does not safe anything, it is forgetting all information when I close it, it is Chromium I just use for this kind for tests.

Here is the faults from Chromium:

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.

Thanks for your help.

OK, @tituspijean your question was actually very helpful! When I looked into the the console, (the logs above) I realized that this could be because of the hovering Yunohost square, which is called “Enable the small ‘YunoHost’ portal shortcut square on apps” in the settings, I disabled this and only one error with 404 now remains.

So for this bug with the shortcut square where would I file the issue, I guess on the App Yunohost Vaultwarden App, right?

The remaining fault is:

/favicon.ico:1     Failed to load resourc e: the server responded with a status of 404 ()

How can I get rid of that?

Edit1:
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

Edit2:
From the Yunohost logs for the Vaultwarden service:

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.

Edit3:
And another problem, I installed Vaultwarden on another domain, ynh.example.org/vaultwarden and there it never finishes loading, I just see this for eternity:

From Firefox error console:

Unhandled Promise rejection: JSON.parse: unexpected character at line 1 column 1 of the JSON data ; Zone: <root> ; Task: Promise.then ; Value: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    get html-storage.service.ts:26
    get stateMigration.service.ts:536
    migrateStateFrom1To2 stateMigration.service.ts:215
    r main.3a27378a743dd4ad9f70.js:1
    invoke zone.js:409
    onInvoke ng_zone.ts:418
    invoke zone.js:408
    run zone.js:169
    C zone.js:1326
    invokeTask zone.js:443
    onInvokeTask ng_zone.ts:403
    invokeTask zone.js:442
    runTask zone.js:214
    b zone.js:632
 get@https://ynh.example.org/vaultwarden/app/main.3a27378a743dd4ad9f70.js:1:380818
get@https://ynh.example.org/vaultwarden/app/main.3a27378a743dd4ad9f70.js:1:211159
80912/migrateStateFrom1To2/<@https://ynh.example.org/vaultwarden/app/main.3a27378a743dd4ad9f70.js:1:201756
r@https://ynh.example.org/vaultwarden/app/main.3a27378a743dd4ad9f70.js:1:196984
90434/n/t.prototype.invoke@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:206210
onInvoke@https://ynh.example.org/vaultwarden/app/vendor.776201439bfdefee32dc.js:2:2120546
90434/n/t.prototype.invoke@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:206150
90434/n/e.prototype.run@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:201290
90434/n/</C/<@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:217465
90434/n/t.prototype.invokeTask@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:206894
onInvokeTask@https://ynh.example.org/vaultwarden/app/vendor.776201439bfdefee32dc.js:2:2120362
90434/n/t.prototype.invokeTask@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:206815
90434/n/e.prototype.runTask@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:201953
b@https://ynh.example.org/vaultwarden/app/polyfills.428c25638840333a09ee.js:2:209300
zone.js:1109:28

I created an issue, please see here:

This does not mean I don’t appreciate or need any more tips here, it just means in order to solve the problem I think it is more support needed.

I’ll keep bumping this issue, it is sad that Vaultwarden is not working at the moment, it is such a great app. :frowning:

so we got someone else who see that the setup is broken. Glad it is not isolated to my machine.

Reading your thread on Friendica, it seems that there could be a conflict between your reinstallation and files remaining from the older installation !? Maybe something, somewhere, to clean.

PS: I’m thinking about installing Vaultwarden, some day, once I’ll know I’m safe with my local backups. Currently using the official Bitwarden.

1 Like

Yes, I have a feeling that this is one of the problems, but how can I find out which files are installed and in which paths I need to check?

It can also be a permission issue, that the server (one of the servers involved, so not only the nginx webserver) does not have the needed permissions.

It is a bit of a pain to get information for this problem.

I guess I will have to dissect the install script of the application. :-/

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.