astubenbord / paperless-mobile

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

[Bug]: Document upload stuck #367

Open hermannoffen opened 5 months ago

hermannoffen commented 5 months ago

What happened?

When I try uploading a PDF document, the app gets stuck. See screenshot. When I enable "skip editing received files" nothing happens at all, when sending a PDF document to the app. The file just gets listed in "Pending files". This happens with all files (from various sources).

Steps to reproduce

  1. Send document to app
  2. Click upload button

Log output from the app

2024-01-15 11:05:37.493 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to restore previous session...
2024-01-15 11:05:37.493 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Verifying user identity...
2024-01-15 11:05:37.497 INFO    --- [                         ] -                          : Setting refresh rate to 90.0
2024-01-15 11:05:39.491 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Identity successfully verified.
2024-01-15 11:05:39.491 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Reading encrypted credentials...
2024-01-15 11:05:39.629 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Credentials successfully retrieved.
2024-01-15 11:05:39.629 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Updating security context...
2024-01-15 11:05:39.629 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Security context successfully updated.
2024-01-15 11:05:39.852 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Trying to update remote paperless user...
2024-01-15 11:05:39.852 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Trying to fetch API version...
2024-01-15 11:05:40.707 WARNING --- [      AuthenticationCubit] - _getApiVersion           : The server is running a newer API version (4) than the app supports (v3), falling back to latest supported version (v3). Warning: This might lead to unexpected behavior!
2024-01-15 11:05:40.707 DEBUG   --- [      AuthenticationCubit] - _getApiVersion           : Successfully retrieved API version (3).
2024-01-15 11:05:40.707 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Trying to update remote user object...
2024-01-15 11:05:41.247 DEBUG   --- [      AuthenticationCubit] - _updateRemoteUser        : Successfully updated remote user object.
2024-01-15 11:05:41.248 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Successfully updated remote paperless user.
2024-01-15 11:05:41.248 DEBUG   --- [      AuthenticationCubit] - restoreSession           : Previous session successfully restored.
2024-01-15 11:05:41.265 DEBUG   --- [          LabelRepository] - findAllTags              : Loading all tags...
2024-01-15 11:05:41.267 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:05:41.953 DEBUG   --- [          LabelRepository] - findAllTags              : Successfully updated all tags.
2024-01-15 11:05:42.275 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:05:42.275 DEBUG   --- [          LabelRepository] - findAllTags              : Loading all tags...
2024-01-15 11:05:42.483 DEBUG   --- [          LabelRepository] - findAllTags              : Successfully updated all tags.
2024-01-15 11:06:40.549 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:06:41.336 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:07:10.567 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:07:11.234 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:07:40.566 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:07:41.144 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:08:10.576 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:08:11.046 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:08:40.576 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:08:41.348 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.
2024-01-15 11:12:44.929 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : Checking for new documents in inbox...
2024-01-15 11:12:45.489 INFO    --- [               InboxCubit] - refreshItemsInInboxCount : No new documents found in inbox.

Screenshots

markup_1000065603 markup_1000065608

Paperless-ng*x Version

2.3.3 (API v4)

Paperless-Mobile Version

3.2.0+404

Device

Google Pixel 7a

Operating System Version

Android 14

Device Locale

German

Selected Locale

German

Additional Context

No response

hermannoffen commented 5 months ago

Maybe, the fallback to API v3 (see app log above) causes this problem?

astubenbord commented 5 months ago

Could well be! I really wish I had more time to investigate (let alone to fix) these bugs but it's just not possible at the moment time-wise :/ I'd still recommend to only update your paperless instance to a newer version if it doesn't include breaking changes and therefore will still be compatible with the app. In this case, it's also due to the way the app handles API versioning since I try to also support older versions, but there have been many cases in which the API was changed without increasing the API version. I will probably have to drop the support for older versions and only focus on the newest ones since I think most users are on newer versions anyway. Otherwise I, as a sole developer, will never be able to keep up with the pace of the paperless-ngx team, who have been working tirelessly on new features and bug fixes in the past months (which is great for everyone but me from a development standpoint šŸ˜„).

hermannoffen commented 5 months ago

Currently it's hard for me to see, what API version paperless-ngx is providing and which are supported by paperless-mobile. Maybe we can add a concise table with this information in this project's README?

I'd really like to get involved contributing here. At the moment I'm transitioning from developing Win32 desktop software to web apps at work. But this will still take some time. And - I don't need to tell you - spare time is rare time. I appreciate very much what you have achieved with paperless-mobile so far!

dangenendt commented 5 months ago

Exactly same behavior here šŸ˜µā€šŸ’«