astubenbord / paperless-mobile

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

Can't login into paperless #368

Open chicco-carone opened 7 months ago

chicco-carone commented 7 months ago

Paperless works in the web interface but if I try connecting to it after the login it gives the error that api4 is not supported and then it gets stuck forever loading. I tried connecting with my local IP and with cloudflare tunnels and none of them work. If someone can tell me where to get some logs I can add it to the issue

krntz commented 7 months ago

I have the same issue, started in the past week or so. App start up fails with "Exception: API4 not supported". Reinstalling does nothing.

Paperless-NGX version: 2.3.3 Paperless Mobile version: 3.1.8

Here's my log output:

2024-01-16 14:50:39.672 DEBUG --- [ AuthenticationCubit] - restoreSession : Trying to restore previous session... 2024-01-16 14:50:39.672 DEBUG --- [ AuthenticationCubit] - restoreSession : There is nothing to restore. 2024-01-16 14:50:39.690 INFO --- [ ] - : Setting refresh rate to 120.00000762939453 2024-01-16 14:51:26.317 DEBUG --- [ AuthenticationCubit] - login : Trying to log in ak@pa***om... 2024-01-16 14:51:26.317 DEBUG --- [ AuthenticationCubit] - _addUser : Adding new user ak@pa***om.. 2024-01-16 14:51:26.317 DEBUG --- [ AuthenticationCubit] - _addUser : Fetching bearer token from the server... 2024-01-16 14:51:26.990 DEBUG --- [ AuthenticationCubit] - _addUser : Bearer token successfully retrieved. 2024-01-16 14:51:26.990 DEBUG --- [ AuthenticationCubit] - _getApiVersion : Trying to fetch API version... 2024-01-16 14:51:27.136 DEBUG --- [ AuthenticationCubit] - _getApiVersion : Successfully retrieved API version (4). 2024-01-16 14:51:27.136 DEBUG --- [ AuthenticationCubit] - _addUser : Trying to fetch remote paperless user for ak@pa***om.

donverse commented 7 months ago

I have the same problem, also running paperless ngx 2.3.3 and app version 3.1.8 (due to broken preview in newer versions). Web access works fine. The same setup worked fine yesterday & the day before, this happened all of the sudden (perhaps after paperless upgrade to 2.3.3 - not certain about that)

Log:

2024-01-16 18:50:49.754 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-01-16 18:50:49.754 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Reading encrypted credentials...
2024-01-16 18:50:49.755 INFO    --- [                         ] -                          : Setting refresh rate to 120.00000762939453
2024-01-16 18:50:49.849 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Credentials successfully retrieved.
2024-01-16 18:50:49.849 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Updating security context...
2024-01-16 18:50:49.849 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Security context successfully updated.
2024-01-16 18:50:49.910 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to update remote paperless user...
2024-01-16 18:50:49.910 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Trying to fetch API version...
2024-01-16 18:50:49.975 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Successfully retrieved API version (4).
2024-01-16 18:50:49.976 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Trying to update remote user object...
2024-01-16 18:50:49.976 ERROR   --- [                         ] - main                     : An unexpected error occurred 
---BEGIN ERROR---
Exception: API 4 not supported.
---END ERROR---
---BEGIN STACKTRACE---
#0      PaperlessApiFactoryImpl.createUserApi (package:paperless_mobile/core/factory/paperless_api_factory_impl.dart:50)
#1      AuthenticationCubit._updateRemoteUser (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:656)
#2      AuthenticationCubit.restoreSession (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:355)
<asynchronous suspension>

---END STACKTRACE---
2024-01-16 18:51:07.226 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-01-16 18:51:07.227 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Reading encrypted credentials...
2024-01-16 18:51:07.228 INFO    --- [                         ] -                          : Setting refresh rate to 120.00000762939453
2024-01-16 18:51:07.344 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Credentials successfully retrieved.
2024-01-16 18:51:07.345 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Updating security context...
2024-01-16 18:51:07.345 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Security context successfully updated.
2024-01-16 18:51:07.385 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to update remote paperless user...
2024-01-16 18:51:07.385 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Trying to fetch API version...
2024-01-16 18:51:07.423 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Successfully retrieved API version (4).
2024-01-16 18:51:07.423 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Trying to update remote user object...
2024-01-16 18:51:07.423 ERROR   --- [                         ] - main                     : An unexpected error occurred 
---BEGIN ERROR---
Exception: API 4 not supported.
---END ERROR---
---BEGIN STACKTRACE---
#0      PaperlessApiFactoryImpl.createUserApi (package:paperless_mobile/core/factory/paperless_api_factory_impl.dart:50)
#1      AuthenticationCubit._updateRemoteUser (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:656)
#2      AuthenticationCubit.restoreSession (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:355)
<asynchronous suspension>

---END STACKTRACE---
2024-01-16 18:58:48.688 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-01-16 18:58:48.688 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Reading encrypted credentials...
2024-01-16 18:58:48.690 INFO    --- [                         ] -                          : Setting refresh rate to 120.00000762939453
2024-01-16 18:58:48.799 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Credentials successfully retrieved.
2024-01-16 18:58:48.799 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Updating security context...
2024-01-16 18:58:48.799 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Security context successfully updated.
2024-01-16 18:58:48.907 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to update remote paperless user...
2024-01-16 18:58:48.907 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Trying to fetch API version...
2024-01-16 18:58:49.157 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Successfully retrieved API version (4).
2024-01-16 18:58:49.157 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Trying to update remote user object...
2024-01-16 18:58:49.157 ERROR   --- [                         ] - main                     : An unexpected error occurred 
---BEGIN ERROR---
Exception: API 4 not supported.
---END ERROR---
---BEGIN STACKTRACE---
#0      PaperlessApiFactoryImpl.createUserApi (package:paperless_mobile/core/factory/paperless_api_factory_impl.dart:50)
#1      AuthenticationCubit._updateRemoteUser (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:656)
#2      AuthenticationCubit.restoreSession (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:355)
<asynchronous suspension>

---END STACKTRACE---
2024-01-16 20:02:57.163 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-01-16 20:02:57.163 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Reading encrypted credentials...
2024-01-16 20:02:57.164 INFO    --- [                         ] -                          : Setting refresh rate to 120.00000762939453
2024-01-16 20:02:57.281 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Credentials successfully retrieved.
2024-01-16 20:02:57.281 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Updating security context...
2024-01-16 20:02:57.281 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Security context successfully updated.
2024-01-16 20:02:57.332 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to update remote paperless user...
2024-01-16 20:02:57.332 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Trying to fetch API version...
2024-01-16 20:02:57.381 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Successfully retrieved API version (4).
2024-01-16 20:02:57.382 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Trying to update remote user object...
2024-01-16 20:02:57.382 ERROR   --- [                         ] - main                     : An unexpected error occurred 
---BEGIN ERROR---
Exception: API 4 not supported.
---END ERROR---
---BEGIN STACKTRACE---
#0      PaperlessApiFactoryImpl.createUserApi (package:paperless_mobile/core/factory/paperless_api_factory_impl.dart:50)
#1      AuthenticationCubit._updateRemoteUser (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:656)
#2      AuthenticationCubit.restoreSession (package:paperless_mobile/features/login/cubit/authentication_cubit.dart:355)
<asynchronous suspension>

---END STACKTRACE---
donverse commented 7 months ago

Paperless works in the web interface but if I try connecting to it after the login it gives the error that api4 is not supported and then it gets stuck forever loading. I tried connecting with my local IP and with cloudflare tunnels and none of them work. If someone can tell me where to get some logs I can add it to the issue

Open the app and hit 'app log' to find the logs.

astubenbord commented 7 months ago

This should be fixed in v3.2.0, but there is a known bug where the in app document preview does not work anymore. I'm working on it though.

chicco-carone commented 7 months ago

This should be fixed in v3.2.0, but there is a known bug where the in app document preview does not work anymore. I'm working on it though.

Ok I just updated to the latest from the f store and now I can login but I can confirm that the documents viewer isn't working

Reussi commented 7 months ago

I have the same problem