New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider that is not exported from uid 10063 #173

Closed
misaochan opened this Issue Jul 12, 2016 · 16 comments

Comments

Projects
None yet
3 participants
@misaochan
Member

misaochan commented Jul 12, 2016

Posted by Tommy Gildseth on 12 Jul:

USER_COMMENT=Clicked the back button from a failed upload
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.17
BRAND=google
PHONE_MODEL=Nexus 5X
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{50fff77 18404:fr.free.nrw.commons/u0a118} (pid=18404, uid=10118) that is not exported from uid 10063
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4783)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1088)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)

@misaochan misaochan added the bug label Jul 12, 2016

@misaochan misaochan changed the title from SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider to SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider that is not exported from uid 10063 Jul 12, 2016

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 12, 2016

Member

Wow, there are an awful lot of bugs involving Google Photos, and my StackOverflow thread isn't yielding any answers. :(

Member

misaochan commented Jul 12, 2016

Wow, there are an awful lot of bugs involving Google Photos, and my StackOverflow thread isn't yielding any answers. :(

@nicolas-raoul

This comment has been minimized.

Show comment
Hide comment
@nicolas-raoul

nicolas-raoul Jul 12, 2016

Member

Linking it here for the sake of findability: http://stackoverflow.com/q/38301605

Member

nicolas-raoul commented Jul 12, 2016

Linking it here for the sake of findability: http://stackoverflow.com/q/38301605

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 18, 2016

Member

Oof, another Google Photos crash just showed up. :/ I've been reading up as much as I can on it, and the only solution I can find seems to require a major overhaul of how the image data is passed around.

Apparently it is due to a permissions change by the google photos provider:

For security reasons, the permissions are temporary, so once the client app's task stack is finished, the file is no longer accessible. You must get the file data when you receive the intent answer, in the onActivityResult method. Store a copy of the file data, because the file won't be available anymore when onActivityResult returns.

http://stackoverflow.com/questions/30572261/using-data-from-context-providers-or-requesting-google-photos-read-permission

For the time being, should we tell people that our app has issues integrating with Google Photos?

Member

misaochan commented Jul 18, 2016

Oof, another Google Photos crash just showed up. :/ I've been reading up as much as I can on it, and the only solution I can find seems to require a major overhaul of how the image data is passed around.

Apparently it is due to a permissions change by the google photos provider:

For security reasons, the permissions are temporary, so once the client app's task stack is finished, the file is no longer accessible. You must get the file data when you receive the intent answer, in the onActivityResult method. Store a copy of the file data, because the file won't be available anymore when onActivityResult returns.

http://stackoverflow.com/questions/30572261/using-data-from-context-providers-or-requesting-google-photos-read-permission

For the time being, should we tell people that our app has issues integrating with Google Photos?

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 19, 2016

Member

Similar crashes:

By Franc Furt, 18 Jul:

USER_COMMENT=
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.18
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{a1da333 7235:fr.free.nrw.commons/u0a121} (pid=7235, uid=10121) that is not exported from uid 10106

at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61) 

By Wikipedia Valencia, 18 Jul:

USER_COMMENT=
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.18
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{8ef5fdb 14995:fr.free.nrw.commons/u0a121} (pid=14995, uid=10121) that is not exported from uid 10106


at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)

at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Member

misaochan commented Jul 19, 2016

Similar crashes:

By Franc Furt, 18 Jul:

USER_COMMENT=
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.18
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{a1da333 7235:fr.free.nrw.commons/u0a121} (pid=7235, uid=10121) that is not exported from uid 10106

at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61) 

By Wikipedia Valencia, 18 Jul:

USER_COMMENT=
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.18
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{8ef5fdb 14995:fr.free.nrw.commons/u0a121} (pid=14995, uid=10121) that is not exported from uid 10106


at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)

at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:176)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:114)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:19)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 19, 2016

Member

How odd. I finally have access to an Android 6 phone... but I can't replicate the Google Photos crash. Yet so many people are having it. :/

I'll submit a PR for what I think MIGHT solve the bug I guess, and we'll see if people still get the crash.

Member

misaochan commented Jul 19, 2016

How odd. I finally have access to an Android 6 phone... but I can't replicate the Google Photos crash. Yet so many people are having it. :/

I'll submit a PR for what I think MIGHT solve the bug I guess, and we'll see if people still get the crash.

@nicolas-raoul

This comment has been minimized.

Show comment
Hide comment
@nicolas-raoul

nicolas-raoul Jul 20, 2016

Member

I also can't reproduce with Android 6.0.1 and Google Photos 1.23.1.126715090
I open Photos, select a picture, press Share, choose Commons, it is loaded and upload works.

Member

nicolas-raoul commented Jul 20, 2016

I also can't reproduce with Android 6.0.1 and Google Photos 1.23.1.126715090
I open Photos, select a picture, press Share, choose Commons, it is loaded and upload works.

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 20, 2016

Member

Yeah, ditto. :/ I'll try to ask them for more details I guess...

Member

misaochan commented Jul 20, 2016

Yeah, ditto. :/ I'll try to ask them for more details I guess...

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 21, 2016

Member

By Wikipedia Valencia on 20 Jul:

USER_COMMENT= New version. Selected several files in Google photos and clicked on "share".
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.20
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{89dd118 8999:fr.free.nrw.commons/u0a125} (pid=8999, uid=10125) that is not exported from uid 10106

at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Member

misaochan commented Jul 21, 2016

By Wikipedia Valencia on 20 Jul:

USER_COMMENT= New version. Selected several files in Google photos and clicked on "share".
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.20
BRAND=motorola
PHONE_MODEL=Moto G (4)
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{89dd118 8999:fr.free.nrw.commons/u0a125} (pid=8999, uid=10125) that is not exported from uid 10106

at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3605)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4799)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1466)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1087)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:942)
at android.content.ContentResolver.openInputStream(ContentResolver.java:662)
at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 21, 2016

Member

Did the exact same thing (selected several files instead of just one) and still no crash on my device... :(

Member

misaochan commented Jul 21, 2016

Did the exact same thing (selected several files instead of just one) and still no crash on my device... :(

@nicolas-raoul

This comment has been minimized.

Show comment
Hide comment
@nicolas-raoul

nicolas-raoul Jul 21, 2016

Member

Do you think that trying to implement http://stackoverflow.com/a/30567302/226958 would be worth a try?
Or is it a different problem?

Member

nicolas-raoul commented Jul 21, 2016

Do you think that trying to implement http://stackoverflow.com/a/30567302/226958 would be worth a try?
Or is it a different problem?

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 21, 2016

Member

Oh, I think I might have succeeded in reproducing the crash after manually revoking permissions and repeating what Wikipedia Valencia did. I think the issue is with MultipleShareActivity.java, which is the activity launched by the <action android:name="android.intent.action.SEND_MULTIPLE" /> intent filter. We have been focusing on ShareActivity.java for runtime permissions because that is the one called by the app code. Will try to add those to MultipleShareActivity and see how it goes.

If it still doesn't work then I might try what the SO thread you linked says.

USER_COMMENT=Testing multiple upload with revoked permissions
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.20
BRAND=samsung
PHONE_MODEL=SM-G930F
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{35f5876 16385:fr.free.nrw.commons/u0a215} (pid=16385, uid=10215) that is not exported from uid 10128


at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4240)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:6392)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2321)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1521)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1139)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:991)
at android.content.ContentResolver.openInputStream(ContentResolver.java:711)

at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
Member

misaochan commented Jul 21, 2016

Oh, I think I might have succeeded in reproducing the crash after manually revoking permissions and repeating what Wikipedia Valencia did. I think the issue is with MultipleShareActivity.java, which is the activity launched by the <action android:name="android.intent.action.SEND_MULTIPLE" /> intent filter. We have been focusing on ShareActivity.java for runtime permissions because that is the one called by the app code. Will try to add those to MultipleShareActivity and see how it goes.

If it still doesn't work then I might try what the SO thread you linked says.

USER_COMMENT=Testing multiple upload with revoked permissions
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.20
BRAND=samsung
PHONE_MODEL=SM-G930F
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{35f5876 16385:fr.free.nrw.commons/u0a215} (pid=16385, uid=10215) that is not exported from uid 10128


at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4240)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:6392)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2321)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1521)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1139)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:991)
at android.content.ContentResolver.openInputStream(ContentResolver.java:711)

at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 21, 2016

Member

Gosh. Now it works for API 23 but not for those below... -_- The difference is that API 21 actually tries to upload first though. The progress bar goes all the way to 100% before it crashes.

Also... the first image uploaded via MultipleShareActivity in API 21 succeeds. It's only the 2nd image onwards that fails.(whereas in API 23 all images fail). Single images uploaded via ShareActivity do not cause a crash.

USER_COMMENT=testing multiple share from Google photos on api21. crashes after category selection etc while photo is uploading
ANDROID_VERSION=5.0.1
APP_VERSION_NAME=1.21
BRAND=samsung
PHONE_MODEL=GT-I9505
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{11b87a1f 18901:fr.free.nrw.commons/u0a300} (pid=18901, uid=10300) that is not exported from uid 10005
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3639)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:5193)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2938)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1452)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1072)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927)
at android.content.ContentResolver.openInputStream(ContentResolver.java:652)


at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
Member

misaochan commented Jul 21, 2016

Gosh. Now it works for API 23 but not for those below... -_- The difference is that API 21 actually tries to upload first though. The progress bar goes all the way to 100% before it crashes.

Also... the first image uploaded via MultipleShareActivity in API 21 succeeds. It's only the 2nd image onwards that fails.(whereas in API 23 all images fail). Single images uploaded via ShareActivity do not cause a crash.

USER_COMMENT=testing multiple share from Google photos on api21. crashes after category selection etc while photo is uploading
ANDROID_VERSION=5.0.1
APP_VERSION_NAME=1.21
BRAND=samsung
PHONE_MODEL=GT-I9505
CUSTOM_DATA=
STACK_TRACE=java.lang.SecurityException: Permission Denial: opening provider com.google.android.apps.photos.contentprovider.MediaContentProvider from ProcessRecord{11b87a1f 18901:fr.free.nrw.commons/u0a300} (pid=18901, uid=10300) that is not exported from uid 10005
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3639)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:5193)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2938)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1452)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1072)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927)
at android.content.ContentResolver.openInputStream(ContentResolver.java:652)


at fr.free.nrw.commons.upload.UploadService.uploadContribution(UploadService.java:178)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:115)
at fr.free.nrw.commons.upload.UploadService.handle(UploadService.java:27)
at fr.free.nrw.commons.HandlerService$ServiceHandler.handleMessage(HandlerService.java:20)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 21, 2016

Member

Well, even after reverting to old APK, API 21 still crashes, so that means the issue has always been there and wasn't caused by my change. So I'll push the fix through anyway to hopefully solve the issue for the API 23 folks first, while looking into API 21.

Member

misaochan commented Jul 21, 2016

Well, even after reverting to old APK, API 21 still crashes, so that means the issue has always been there and wasn't caused by my change. So I'll push the fix through anyway to hopefully solve the issue for the API 23 folks first, while looking into API 21.

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Jul 22, 2016

Member

From La Represa:

Selected several files from G. photos. I was able to upload 2 in a row. With 11 it crashes

Member

misaochan commented Jul 22, 2016

From La Represa:

Selected several files from G. photos. I was able to upload 2 in a row. With 11 it crashes

@misaochan

This comment has been minimized.

Show comment
Hide comment
@misaochan

misaochan Oct 10, 2016

Member

Some people are still having issues. New response about this:

Usually crash only if i don't wait every single upload and there are some photos awaiting "in coda"

Member

misaochan commented Oct 10, 2016

Some people are still having issues. New response about this:

Usually crash only if i don't wait every single upload and there are some photos awaiting "in coda"

@neslihanturan

This comment has been minimized.

Show comment
Hide comment
@neslihanturan

neslihanturan Jan 16, 2018

Collaborator

I guess this is no longer a problem.

Collaborator

neslihanturan commented Jan 16, 2018

I guess this is no longer a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment