YunoHost-Apps / vaultwarden_ynh

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

Can't login to Vaultwarden Web access (user access, not admin) when logged to Yunohost SSO at the same time #142

Closed Dont-ask-for-it closed 10 months ago

Dont-ask-for-it commented 3 years ago

Last Yunohost and Vaultwarden version, as today. Fresh install yesterday.

Access page loading gif roll forever. Same page with Chrome incognito / private session is ok Logging out of Yunohost and CTRL-F5 wont work, cache is persistent and I have to manual erase everythin in Chrome history

sy6sy2 commented 3 years ago

Same issue for me.

[Error] ERROR – SyntaxError: JSON Parse error: Unexpected identifier "fr" — htmlStorage.service.ts:41
SyntaxError: JSON Parse error: Unexpected identifier "fr" — htmlStorage.service.ts:41
    Ar (vendor.1ce65c29f5be69fbdfec.js:256:371)
    (fonction anonyme) (vendor.1ce65c29f5be69fbdfec.js:263:402)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:13:2497)
    (fonction anonyme) (vendor.1ce65c29f5be69fbdfec.js:1090:3255)
    onInvoke (vendor.1ce65c29f5be69fbdfec.js:1076:1718)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:13:2497)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:21:2721)
    onInvokeTask (vendor.1ce65c29f5be69fbdfec.js:1076:1605)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:13:3164)
    m (polyfills.1ce65c29f5be69fbdfec.js:13:10426)
    promiseReactionJob
[Error] Unhandled Promise rejection: – "JSON Parse error: Unexpected identifier \"fr\"" – "; Zone:" – "<root>" – "; Task:" – "Promise.then" – "; Value:" (2)
SyntaxError: JSON Parse error: Unexpected identifier "fr" — htmlStorage.service.ts:41
parse
(fonction anonyme) — htmlStorage.service.ts:41
(fonction anonyme) — services.module.ts:181
(fonction anonyme) — main.1ce65c29f5be69fbdfec.js:77222
o — main.1ce65c29f5be69fbdfec.js:77128
onInvoke — core.js:28144
(fonction anonyme) — zone.js:157
(fonction anonyme) — zone.js:891
onInvokeTask — core.js:28132
(fonction anonyme) — zone.js:207
m — zone.js:619
promiseReactionJob
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:21:313)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:21:651)
    t (polyfills.1ce65c29f5be69fbdfec.js:21:718)
    (fonction anonyme) (polyfills.1ce65c29f5be69fbdfec.js:21:735)
    m (polyfills.1ce65c29f5be69fbdfec.js:13:10493)
    promiseReactionJob
[Error] The Content Security Policy 'default-src https: data: 'unsafe-inline' 'unsafe-eval'  ' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no effect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header.
[Error] The Content Security Policy 'default-src https: data: 'unsafe-inline' 'unsafe-eval'  ' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no effect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header.
dragondaddy commented 3 years ago

Same problem here. Fortunately the vault is usable with other clients, but still a bit frustrating.

isAAAc commented 3 years ago

metoo

yalh76 commented 3 years ago

:'( I've tested on firefox on Windows and Chrome on Windows, unable to reproduce //

sy6sy2 commented 3 years ago

Removing local storage of my browser seems to solve the issue on my side. I will try to perform more test just to be sure the issue is completely gone.

Salamandar commented 2 years ago

Hey, is there any news about this issue ? Moving the app to a subdomain works but that's not an acceptable solution in the long term :)

botagas commented 2 years ago

Last Yunohost and Vaultwarden version, as today. Fresh install yesterday.

Access page loading gif roll forever. Same page with Chrome incognito / private session is ok Logging out of Yunohost and CTRL-F5 wont work, cache is persistent and I have to manual erase everythin in Chrome history

Any news? I am in the same boat - I have installed in a subpath (domain.tld/vaultwarden), and whenever I have logged in at least once, when I try to access the page again, it just keeps spinning forever until I completely clean the data for the page.

FlorentPoinsaut commented 2 years ago

@yalh76 writed:

:'( I've tested on firefox on Windows and Chrome on Windows, unable to reproduce //

I reproduce. It's only if you install Vaultwarden with a subpath of the same domain as Yunohost admin. After login once at Yunohost admin, you can't login in Bitwarden anymore.

It's because the javascript try to parse data write by Yunohost admin and don't give what it expect. Here "fr" as locale.

@sy6sy2 write:

Removing local storage of my browser seems to solve the issue on my side. I will try to perform more test just to be sure the issue is completely gone.

Yes it's a functionnal workaround

isAAAc commented 2 years ago

perhaps it should be in the readme.md ?

Salamandar commented 2 years ago

It should forbid installation as a subpath or force installation on a subdomain, until this is fixed.

botagas commented 2 years ago

It should forbid installation as a subpath or force installation on a subdomain, until this is fixed.

I recently tried installing Vaultwarden on a subdomain and it actually doesn't even work, gives a 404 error. Only works on a subpath for me.

dillfrescott commented 2 years ago

It should forbid installation as a subpath or force installation on a subdomain, until this is fixed.

Had no idea it was the subpath doing that. Ill have to try it on a subdomain and see if it even works for me...

Salamandar commented 2 years ago

It should forbid installation as a subpath or force installation on a subdomain, until this is fixed.

I recently tried installing Vaultwarden on a subdomain and it actually doesn't even work, gives a 404 error. Only works on a subpath for me.

It has to be in both a subpath and a subdomain. I set vaultwarden as "default" app for the subdomain as it's the only app.

isAAAc commented 2 years ago

just tried yesterday, new install with:

It has to be in both a subpath and a subdomain.
I set vaultwarden as "default" app for the subdomain as it's the only app.

result: the access access isn't recognised

:/

Salamandar commented 2 years ago

just tried yesterday, new install with:

It has to be in both a subpath and a subdomain.
I set vaultwarden as "default" app for the subdomain as it's the only app.

result: the access access isn't recognised

:/

In clients (desktop, smartphone, firefox plugin) you need to set the full path (subdomain + subpath) even if you set the app as default for the domain.

zanovis commented 10 months ago

@Tagadda what commit fixed this?

Tagadda commented 10 months ago

@zanovis I don't know for sure. Many things changed since June 2022, in this app and in YunoHost.