ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.07k stars 1.55k forks source link

app crash at time of upload image #1169

Open mohammed-mudassir opened 4 years ago

mohammed-mudassir commented 4 years ago

Version

Tell us which versions you are using:

Platform

Tell us to which platform this issue is related

Expected behaviour

Actual behaviour

Steps to reproduce

1.

2.

3.

Attachments

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective: 👉 https://opencollective.com/react-native-image-crop-picker/donate

MuhammedFadel commented 4 years ago

thank you so much for your helping. I'm using "react-native-image-crop-picker": "^0.24.1" "react-native": "^0.59.10"

when I take a photo or video app crashed in Android but not testing in iOS, before one week everything was working fine, also I tried to use versions "^0.25.0" and "^0.26.1" same error happen

qq912276337 commented 4 years ago

the same error "react-native-image-crop-picker": "^0.24.1" "react-native": "^0.59.8" app crashed in Android but not testing in iOS so how to solve it ?

pk-mallik commented 4 years ago

We were having the same problem. Finally traced it down to the 'cropping: true' prop in the ImagePicker. What is happening is this. The app works fine when we generate an 'apk' for internal testing. However when the app bundle is generated and installed for publication in the app store ('aab' file) it crashes when after the cropping screen appears and image is selected for upload. I suspect the problem is occurring because the android setting is 'auto' for app install location (android:installLocation="auto" in ApplicationManifest) and seems to be a file write issue when it tries to write the file in external storage after the cropping control) This may be an issue in teh file write component and is definitely a bug in Android publish itself (the same problem may occur with any other component trying to write temporary files) The workaround is to set 'cropping : false' in the ImagePicker for now.

MuhammedFadel commented 4 years ago

when I removed react-native-paytabs library everything works fine in Android and iOS

hanaechahid commented 4 years ago

I'm also facing the same error but only on ios and only when the debugger js remote mode is deactivated, instead when I run the app on debugging mode the library works very well without any problems !!!!!

hanaechahid commented 4 years ago

@pk-mallik I have changed the cropping property to false but nothing works, the still crashes every time I would take or choose the taken picture

byteab commented 4 years ago

open the debugger and trace the logs. your can find the cause of error. if it be some native side error your can use "adb logcat E:* ". for me the error was using ActivityIndicator without importing it