react-native-image-tools icon indicating copy to clipboard operation
react-native-image-tools copied to clipboard

Crash onPress back button android while picking image

Open edencakir opened this issue 7 years ago • 7 comments

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2233, result=0, data=null} to activity

This is the log of the crash after android back button press while uploading an image from Gallery.

React Native 0.46.3 Android Emulator Nexus 5, Latest library version, Example app code

edencakir avatar Jul 15 '17 13:07 edencakir

+1 Same on IOS too.

srameshr avatar Jul 15 '17 14:07 srameshr

Any idea how to fix this? I can use a lead and fix it for Android

edencakir avatar Jul 19 '17 07:07 edencakir

@edencakir https://github.com/npomfret/react-native-image-tools/issues/4 Do you have any idea around this?

srameshr avatar Jul 19 '17 13:07 srameshr

@srameshr I don't think this repo is being maintained. No ideas too.

edencakir avatar Jul 19 '17 14:07 edencakir

@srameshr iOS doesn't have a back button. What did you do to reproduce the issue?

npomfret avatar Jul 23 '17 17:07 npomfret

@npomfret I commented on the wrong thread 😅 . Actually my app was crashing as soon as I opened the editor because few permissions were missing on info.plist file.

srameshr avatar Jul 24 '17 07:07 srameshr

@edencakir This is the solution to your problem line 344 in RNImageToolsModule.java replace the whole function with this

void resolve(Uri uri) { if(uri != null) { String realPathFromURI = uri.toString(); if (callback != null) { callback.resolve(realPathFromURI); } } }

ibrahimahmed-io avatar Aug 21 '17 11:08 ibrahimahmed-io