hegocre / NextcloudPasswords

Secure app for viewing passwords for the Nextcloud Passwords app. Supports end-to-end encryption.
GNU General Public License v3.0
55 stars 0 forks source link

App logs out constantly #137

Closed JonathanTreffler closed 1 day ago

JonathanTreffler commented 2 days ago

Checklist

Affected version

v1.0.10

Steps to reproduce the bug

  1. Log into app
  2. Use app multiple times (including autofill)
  3. After some time (sometimes days, sometimes hours) when opening the app it will show as logged out and autofill will get disabled

Expected behavior

The app should stay logged in

Actual behavior

The app app gets logged out. This happens on every device I have tested, no matter which Android OS it is running. The common factor is my nextcloud instance, but other nextcloud apps have no trouble staying logged in with this instance.

I have tried using an app password to log in in the login webview, but it still logged me out after a short while.

Screenshots/Screen recordings

No response

Affected Android/Custom ROM version

CalyxOS 5.13.0 (Android 14), Graphene OS, Android 15 (Pixel stock)

Affected device model

Fairphone 5, Pixel 6 (Graphene), Pixel 6 (Stock)

Additional information

hegocre commented 2 days ago

Hello @JonathanTreffler

I will look into it and see if there is some case that I am not handling correctly.

Meanwhile, it would be great if you could check the logs on the nextcloud instace and see if there is an error there.

Thank you!

JonathanTreffler commented 2 days ago

It happened again, this is the error message. I will check the server logs around this timestamp later.

IMG_20241130_220245.jpg

hegocre commented 1 day ago

Hello! This error happens when the app receives an error 401 or 403 while trying to open a session with the password manager app. Is there any chance your server sometimes returns this error (maybe when connecting from certain IPs)?

JonathanTreffler commented 1 day ago

Since it only happens when the app starts and the nextcloud server did not revoke the session I just assumed there was an issue with the local storage of the session token.

I did not know passwords has an additional session system and it makes sense that if that returns wrong data on the start when requesting the session, it would log out. I did check if there was an update for passwords a few days ago and it showed no updates whatsoever for the instance, but I checked again and now there are quite a few, some older than a few days, so it must have had an issue fetching available updates. I have now updated that passwords app and I am assuming the error was fixed by https://github.com/marius-wieschollek/passwords/pull/684 .

Thank you for the help :) I will close the issue and reopen in case it happens again.