SDK28 / SDK29 problem on ImagePicker.launchImageLibraryAsync()

#1

Now Issue

On Some devices, ImagePicker.launchImageLibraryAsync() restart de App.
Tested On Sony F3116 - Android 7.0

#Create Blanck App
$ exp detach

App.js
https://snack.expo.io/@i9xp/test-get-files-library

Some reports on Play Store Publish

Android 7.0 8 61.5%
Android 6.0 4 30.8%
Android 7.1 1 7.7%
Galaxy J7 Neo (j7velte) 2 15.4%
VIBE K6 (K33b36) 2 15.4%
Galaxy J7 Prime (on7xelte) 2 15.4%
Galaxy J5 (j5lte) 2 15.4%
VIBE K6 Note (K53b36) 2 15.4%
Galaxy A9 Pro (a9xproltesea) 1 7.7%
Galaxy J5 Prime (on5xelte) 1 7.7%
Moto G4 Play (harpia_t) 1 7.7%

The Problens

We have an App With 16k Users, 8K Active Users. Some user have starting to experiencing some several Bugs like:

Published App

https://play.google.com/store/apps/details?id=br.com.i9xp.ecocard

takeSnapshotAsync() SDK 29 Error On Any Real Device
#2

I tested one cliente phone With the problem:

Sony Xperia XA F3116
Android 7.0

08-16 16:31:38.557 10112-10355/br.com.i9xp.ecocard E/ImageLoader: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary:DCIM/100ANDRO/DSC_0008.JPG from pid=10112, uid=10305 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
    java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary:DCIM/100ANDRO/DSC_0008.JPG from pid=10112, uid=10305 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
        at android.os.Parcel.readException(Parcel.java:1683)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188)
        at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:151)
        at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692)
        at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1179)
        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:998)
        at android.content.ContentResolver.openInputStream(ContentResolver.java:718)
        at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStreamFromContent(BaseImageDownloader.java:225)
        at com.nostra13.universalimageloader.core.download.BaseImageDownloader.getStream(BaseImageDownloader.java:92)
        at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.downloadImage(LoadAndDisplayImageTask.java:291)
        at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryCacheImageOnDisk(LoadAndDisplayImageTask.java:274)
        at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:230)
        at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:136)
        at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:297)
        at com.nostra13.universalimageloader.core.ImageLoader.displayImage(ImageLoader.java:209)
        at com.nostra13.universalimageloader.core.ImageLoader.loadImage(ImageLoader.java:528)
        at com.nostra13.universalimageloader.core.ImageLoader.loadImage(ImageLoader.java:489)
        at com.nostra13.universalimageloader.core.ImageLoader.loadImageSync(ImageLoader.java:602)
        at com.nostra13.universalimageloader.core.ImageLoader.loadImageSync(ImageLoader.java:559)
        at versioned.host.exp.exponent.modules.api.ImagePickerModule$1.run(ImagePickerModule.java:304)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
#3

Hello @victorwads, please take a loot at Permissions under android.permissions key. From what I see from your previous post, some devices require MANAGE_DOCUMENTS to access some files. By default this permission is turned off and this might causing mentioned issue in detached apps.
I’ll build detached app based on your snack example and investigate problem further if needed.

#4

@barthec Thanks, i’m waiting user tests to give his feedback about new version.

closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.