astubenbord / paperless-mobile

An (almost) fully fledged mobile paperless client.
GNU General Public License v3.0
733 stars 37 forks source link

[Bug]: Login stuck at getting Userinformation #315

Closed CoReYeDe closed 11 months ago

CoReYeDe commented 11 months ago

What happened?

What happened? Insert https://dms.domain.de, then its connected and i can input credentials. After Login it stuck at: Benutzerinformationen werden abgerufen

Tested with Paperless-ngx Version 1.7.0, 1.8.0 and 2.0.1 User is Admin with alle Accessrights checked Also created a new Group with all Access granted and add User to it.

Steps to reproduce

Open App insert https://dms.domain.de insert credentials -> login Screenshots No response

Log output from the app

Benutzerinformationen werden abgerufen

Screenshots

photo_2023-12-01_14-20-25

Paperless-ng*x Version

1.7.0, 1.8.0 and 2.0.1

Paperless-Mobile Version

3.1.3

Device

Nothing Phone 2

Operating System Version

Android 13

Device Locale

german

Selected Locale

None

Additional Context

No response

brpaz commented 11 months ago

I have a similar problem but mine is stuck at "Authenticating".

My user has Superuser permission.

Pixel 7, Android 14.

Here are the logs:

2023-12-14 21:30:07.277 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2023-12-14 21:30:07.277 DEBUG   --- [      AuthenticationCubit] - restoreSession           : There is nothing to restore.
2023-12-14 21:30:07.279 INFO    --- [                         ] -                          : Setting refresh rate to 90.0
2023-12-14 21:33:12.448 DEBUG   --- [      AuthenticationCubit] - login                    : Trying to log in brpaz@do***ev...
2023-12-14 21:33:12.451 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Adding new user brpaz@do***ev..
2023-12-14 21:33:12.451 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Fetching bearer token from the server...
2023-12-14 21:37:45.880 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2023-12-14 21:37:45.880 DEBUG   --- [      AuthenticationCubit] - restoreSession           : There is nothing to restore.
2023-12-14 21:37:45.882 INFO    --- [                         ] -                          : Setting refresh rate to 90.0
2023-12-14 21:38:36.188 DEBUG   --- [      AuthenticationCubit] - login                    : Trying to log in brpaz@do***ev...
2023-12-14 21:38:36.189 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Adding new user brpaz@do***ev..
2023-12-14 21:38:36.189 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Fetching bearer token from the server...
2023-12-14 21:44:28.286 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2023-12-14 21:44:28.286 DEBUG   --- [      AuthenticationCubit] - restoreSession           : There is nothing to restore.
2023-12-14 21:44:28.288 INFO    --- [                         ] -                          : Setting refresh rate to 90.0
2023-12-14 21:44:52.549 DEBUG   --- [      AuthenticationCubit] - login                    : Trying to log in brpaz@do***ev...
2023-12-14 21:44:52.549 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Adding new user brpaz@do***ev..
2023-12-14 21:44:52.549 DEBUG   --- [      AuthenticationCubit] - _addUser                 : Fetching bearer token from the server...
CoReYeDe commented 11 months ago

Tested with 3.1.8 Same problem. Here is the log

image

Any Ideas?

I use paperless behind nginx-proxy-manager with cert from letsencrypt. When i enter the direct url to paperless, i can login and start using the app :)

CoReYeDe commented 11 months ago

I found the Problem after a bit research and its so simple.. NginxProxyManager proxy-host is configured with access-list And with access-list "publicly accessible" the app work without problem. After reenable the access-list (that is scoped to my local subnet) i can not fetch the userinformation.

image

The problem is the option to "pass auth to host" - this option must be enabled I think NPM is removing the auth-header from the request of the app and so i get an 401-Error in the NPM-Proxy-Host-Logs for my Device on my allowed subnet.

So for me, the issue is not app-related and can be closed (i think it can be useful for other appusers they host paperless behind NPM)

astubenbord commented 11 months ago

Thanks for this. However, I think the app should provide more comprehensive information to the user about what exactly went wrong. I'll add more log output and better feedback. I'll open a new issue.

slaesh commented 9 months ago

"same" error here, actually not the same, but similar..

it is user-related. at least on my side..

I have two users.

  1. can login properly. (superuser, not the admin)
  2. cant login, same device, same app. (normal user)

are there any rights needed to use the app, in particular the api? cant find any "api" rights under the user and rights section?

the error in the logs says something like "your server is using a different api version" .. but it is not, since the one user works just fine :)

slaesh commented 9 months ago

nvm.. as we in germany say.. "He who can read is clearly at an advantage".. the login screen suggests what rights are needed... :see_no_evil:

Dreamoffice commented 5 months ago

i can not login with the app. not as admin or as superuser. if i modify the access list it is not working and i get an error in the app. i can only log in via the browser. how can i fugure out the problem?

TimetravelerDD commented 3 months ago

nvm.. as we in germany say.. "He who can read is clearly at an advantage".. the login screen suggests what rights are needed... 🙈

i had the same issue and only figured it out with the help of your comment. I agree the error message (or rather loading screen) after 5-10 secounds should mention something like: "are you sure the admin has given your account the correct user permission 'can view xyz' ?"

justcharlie commented 2 months ago

I'm having this problem also, can't login via admin account but logging in via browser works fine. I checked permissions and I'm attempting this over the local network, so not even using wireguard or anything like that to VPN in. Any help appreciated!