qcasey / paperless_share

Android App to share your documents with your Paperless server
GNU General Public License v3.0
151 stars 10 forks source link

Share stuck on login screen #10

Open thelazyoxymoron opened 3 years ago

thelazyoxymoron commented 3 years ago

Hi,

When I try to share any document, the app brings up the login screen and doesn't proceed further even if I've provided the login details correctly. When I checked in the main app (i.e. opening paperless_share rather than trying to share a document from other app's share feature), it shows that I'm logged in successfully.

I'm attaching the relevant adb logs, please take a look. Let me know if you need any more information.

System: MIUI 12 OS: Android 11

08-29 16:11:02.521  6607  6919 D PowerCheckerService: foreground, uid = 10579, app = com.quinncasey.paperless_share
08-29 16:11:03.028  4920  4957 I ProcessMonitor: onForegroundInfoChanged: ForegroundInfo{mForegroundPackageName='com.simplemobiletools.gallery.pro', mForegroundUid=10237, mForegroundPid=30481, mLastForegroundPackageName='com.quinncasey.paperless_share', mLastForegroundUid=10579, mLastForegroundPid=31337, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:03.028  4920  4957 I GameBoosterService: onForegroundInfoChanged: Cur=com.simplemobiletools.gallery.pro  last=com.quinncasey.paperless_share
08-29 16:11:03.028  6607  6657 D PerfEngineController: ForegroundInfo{mForegroundPackageName='com.simplemobiletools.gallery.pro', mForegroundUid=10237, mForegroundPid=30481, mLastForegroundPackageName='com.quinncasey.paperless_share', mLastForegroundUid=10579, mLastForegroundPid=31337, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:03.045  4920  4957 D GameBoosterService: onGameStatusChange foreground:ForegroundInfo{mForegroundPackageName='com.simplemobiletools.gallery.pro', mForegroundUid=10237, mForegroundPid=30481, mLastForegroundPackageName='com.quinncasey.paperless_share', mLastForegroundUid=10579, mLastForegroundPid=31337, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:04.880   563   563 D ResolverListAdapter: processSortedlist: ResolveInfo{81b901d com.quinncasey.paperless_share/.MainActivity m=0x608000}
08-29 16:11:04.881   563   563 I ResolverListAdapter: Add DisplayResolveInfo component: ComponentInfo{com.quinncasey.paperless_share/com.quinncasey.paperless_share.MainActivity}, intent component: ComponentInfo{com.quinncasey.paperless_share/com.quinncasey.paperless_share.MainActivity}
08-29 16:11:04.881   563   563 D ResolverListAdapter: addResolveInfo: ResolveInfo{81b901d com.quinncasey.paperless_share/.MainActivity m=0x608000}
08-29 16:11:04.881   563   563 D ResolverListAdapter: processSortedlist: ResolveInfo{2d423bf eu.bauerj.paperless_app/.MainActivity m=0x608000}
08-29 16:11:04.881   563   563 I ResolverListAdapter: Add DisplayResolveInfo component: ComponentInfo{eu.bauerj.paperless_app/eu.bauerj.paperless_app.MainActivity}, intent component: ComponentInfo{eu.bauerj.paperless_app/eu.bauerj.paperless_app.MainActivity}
08-29 16:11:04.881   563   563 D ResolverListAdapter: addResolveInfo: ResolveInfo{2d423bf eu.bauerj.paperless_app/.MainActivity m=0x608000}
08-29 16:11:06.012   563   563 D ChooserActivityForCts: ResolveInfo Package is com.quinncasey.paperless_share
08-29 16:11:06.013  1747  4815 I ActivityTaskManager: START u0 {act=android.intent.action.SEND typ=image/jpeg flg=0xb080001 cmp=com.quinncasey.paperless_share/.MainActivity clip={image/jpeg {...}} (has extras)} from uid 1000
08-29 16:11:06.025  1747  4426 I ActivityTaskManager: The Process com.quinncasey.paperless_share Already Exists in BG. So sending its PID: 31337
08-29 16:11:06.025   876   942 I ANDR-PERF-LM: MetaMeter: isValidAsync() 203: Invalid (hintID,hintType,appName,duration,appPID,appThreadTID) = (4225, 102,com.quinncasey.paperless_share,31337,1747,4426)
08-29 16:11:06.029  6607  6657 D PerfEngineController: ForegroundInfo{mForegroundPackageName='com.quinncasey.paperless_share', mForegroundUid=10579, mForegroundPid=31337, mLastForegroundPackageName='android', mLastForegroundUid=1000, mLastForegroundPid=563, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:06.029  4920  4957 I ProcessMonitor: onForegroundInfoChanged: ForegroundInfo{mForegroundPackageName='com.quinncasey.paperless_share', mForegroundUid=10579, mForegroundPid=31337, mLastForegroundPackageName='android', mLastForegroundUid=1000, mLastForegroundPid=563, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:06.029  4920  4957 I GameBoosterService: onForegroundInfoChanged: Cur=com.quinncasey.paperless_share     last=android
08-29 16:11:06.029  4920  4957 D GameBoosterService: onGameStatusChange foreground:ForegroundInfo{mForegroundPackageName='com.quinncasey.paperless_share', mForegroundUid=10579, mForegroundPid=31337, mLastForegroundPackageName='android', mLastForegroundUid=1000, mLastForegroundPid=563, mMultiWindowForegroundPackageName='null', mMultiWindowForegroundUid=-1, mFlags=0}
08-29 16:11:06.057  1747  4434 W ActivityManager: Permission Denial: opening provider androidx.core.content.FileProvider from ProcessRecord{d7e68a0 31337:com.quinncasey.paperless_share/u0a579} (pid=31337, uid=10579) that is not exported from UID 10237
08-29 16:11:06.096  2863  2863 D RecentsImpl: mActivityStateObserver com.quinncasey.paperless_share.MainActivity
08-29 16:11:06.134  1747  1835 D ArtManagerInternalImpl: /data/misc/iorapd/com.quinncasey.paperless_share/1006/com.quinncasey.paperless_share.MainActivity/compiled_traces/compiled_trace.pb doesn't exist
08-29 16:11:06.144  1747  1835 I ActivityTaskManager: Displayed com.quinncasey.paperless_share/.MainActivity: +117ms
08-29 16:11:06.145   876   876 I ANDR-PERF-LM: FeedbackAPI: getFeedback() 60: app:com.quinncasey.paperless_share feature:AppClassifier feedback = 1
08-29 16:11:06.297  1747  1835 I ActivityTaskManager: Fully drawn com.quinncasey.paperless_share/.MainActivity: +284ms
08-29 16:11:06.872  1747  1828 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{7824dad u0 com.quinncasey.paperless_share/.MainActivity t55752} time:18581143
qcasey commented 3 years ago

Thanks for reporting this.

08-29 16:11:06.057  1747  4434 W ActivityManager: Permission Denial: opening provider androidx.core.content.FileProvider from ProcessRecord{d7e68a0 31337:com.quinncasey.paperless_share/u0a579} (pid=31337, uid=10579) that is not exported from UID 10237

I think it has something to do with how the intent is constructed. I'll look into this best I can, might be difficult if I can't reproduce.

Do you have the same issue when sharing to eu.bauerj.paperless_app? IIRC the sharing implementation is about the same.

Eyeball753 commented 2 years ago

Thanks for reporting this.

08-29 16:11:06.057  1747  4434 W ActivityManager: Permission Denial: opening provider androidx.core.content.FileProvider from ProcessRecord{d7e68a0 31337:com.quinncasey.paperless_share/u0a579} (pid=31337, uid=10579) that is not exported from UID 10237

I think it has something to do with how the intent is constructed. I'll look into this best I can, might be difficult if I can't reproduce.

Do you have the same issue when sharing to eu.bauerj.paperless_app? IIRC the sharing implementation is about the same.

I'm having the exact same issue as OP and can confirm that it doesn't work with bauerj's version, either. At least for me. With his version it just opens the app to the My Documents screen and nothing happens. If you need any logs, let me know how I do that.

jpbaril commented 2 years ago

Same problem. But weirdest thing is: 5 minutes ago it was working. I tried disconnecting and reconnecting. I also tried to restart Paperless-ng server. Nothing does it. I even tried with your demo server as shown in another issue ticket, that did not work either. Sharing through eu.bauerj.paperless_app works.

danielr1996 commented 2 years ago

I have the same problem, at least I'm stuck on to login screen too. I noticed too things: 1) I'm running with https only (http is redirected), maybe that has something todo with it. 2) I'm running it in my LAN only, but with hostname overrides in opnsense so I can use public domains with letsencrypt. Running with @bauerj s app I get at least an error message stating that "No address is associated with that hostname", which suggests that at least his implementation doesn't use the dhcp assigned dns server. Don't know if this applies to that app as well. 3) It is also notable that im running paperless-ng instead of paperless, but maybe a month ago it worked with both apps, but running on unraid with direct ip access and no https.

Update: I tried disabled the http to https forwarding and and did still not work, then I accessed it by ip directly and now it works, so this seems to be indeed a problem with the dns server. These two issues suggest that the Dart http client is lacking a few features regarding dns: https://github.com/flutterchina/dio/issues/228 https://github.com/dart-lang/sdk/issues/36551

rk0n commented 2 years ago

Something new on this?

Can't connect to my instance. I tried connecting using http and https. The official paperless app works just fine.

eingemaischt commented 2 years ago

I do have the same problem...

rk0n commented 2 years ago

I found a workaround on Android by deleting the PaperlessShare App and using the new share function of the official Paperless App