Skip to content
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

[Crash] CropProvider.convertBitmapToFile - java.io.IOException - No such file or directory #105

Open
djdominoSVK opened this issue Aug 14, 2023 · 2 comments

Comments

@djdominoSVK
Copy link

Hi, in last 3 days, fresh crash from ImagePicker library appeared in our crashlytics.

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=468424901, result=-1, data=Intent { dat=content://media/... flg=0x41 clip={image/* video/* {U(content)}} }} to activity {cz.o2.moje/com.github.drjacky.imagepicker.ImagePickerActivity}: java.io.IOException: No such file or directory at android.app.ActivityThread.deliverResults(ActivityThread.java:5994) at android.app.ActivityThread.handleSendResult(ActivityThread.java:6033) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Caused by java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively0(UnixFileSystem.java) at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317) at java.io.File.createNewFile(File.java:1006) at com.github.drjacky.imagepicker.provider.CropProvider.convertBitmapToFile(CropProvider.kt:235) at com.github.drjacky.imagepicker.provider.CropProvider.cropImage(CropProvider.kt:166) at com.github.drjacky.imagepicker.provider.CropProvider.startIntent(CropProvider.kt:128) at com.github.drjacky.imagepicker.ImagePickerActivity.setMultipleCropper(ImagePickerActivity.kt:198) at com.github.drjacky.imagepicker.ImagePickerActivity.setMultipleImage(ImagePickerActivity.kt:186) at com.github.drjacky.imagepicker.provider.GalleryProvider.handleResult(GalleryProvider.java:171) at com.github.drjacky.imagepicker.provider.GalleryProvider.handleResult(GalleryProvider.java:154) at com.github.drjacky.imagepicker.ImagePickerActivity.galleryLauncher$lambda-0(ImagePickerActivity.java:54) at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:418) at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:375) at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:819) at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:152) at android.app.Activity.dispatchActivityResult(Activity.java:8951) at android.app.ActivityThread.deliverResults(ActivityThread.java:5987) at android.app.ActivityThread.handleSendResult(ActivityThread.java:6033) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

The way we use library:
galleryLauncher.launch(activity?.let { ImagePicker.with(it) .cropSquare() .cropOval() .maxResultSize(512, 512, false) .galleryOnly() .setMultipleAllowed(false) .galleryMimeTypes( mimeTypes = arrayOf( "image/png", "image/jpg", "image/jpeg" ) ).createIntent() }) }

All devices are running on Android 13 from several manufacturers Xiaomi, Samsung, Motorola..

Can you help us with fixing the issue, please?

@MehdiNezamipour
Copy link

we also have this issue in our app Please notice it sooner thank you.

@Biglia12
Copy link

Hello, I have the same problem on android 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants