ivpusic / react-native-image-crop-picker

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

App is restart when i select the image from the camera. #1519

Open gulsher7 opened 3 years ago

gulsher7 commented 3 years ago

Version

Tell us which versions you are using:

Platform

Tell us to which platform this issue is related

App is work fine in case of gallery selection image. But when i click the image from the camera then the app is restart.

prtkkmrsngh commented 3 years ago

@gulsher7 hey, we are also facing same issue with OPPO and VEVO devices. Did you find some workaround on this?

akanksha-agarwal93 commented 3 years ago

Hello, we are facing the same issue with few Samsung devices. Did you guys find any solution on this ?

hagar0459 commented 3 years ago

i also have the same issue inn huawei tablet ,is there any alternative option to get images form the gallery and not have this issue, my app is in production and need quick help on that ,please

lewisbird commented 3 years ago

Still also having the issue with some android devices though cannot spot a common pattern as to why. Not getting any react native errors either.

mrsasuu commented 3 years ago

Same here

mrsasuu commented 3 years ago

Can be related to #1509 and #1526?

akanksha-agarwal93 commented 3 years ago

I got the issue resolved - for me, flipper was the problem. If you are using React-Native version > 0.60 try -

@override public void onCreate() { super.onCreate(); SoLoader.init(this, / native exopackage / false); // initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); -------> commenting this line helped }

in MainApplication.java

radadiyarushita commented 3 years ago

Hello Team, Same issue I've facing right now. The app is restart when I select the image from the camera

felix4321 commented 3 years ago

I have the same problem with an HUAWEI P30 lite. Are there any updates?

"react-native-image-crop-picker": "0.36.0", "react-native": "0.64.0",

syntacticsolutions commented 3 years ago

In my case the issue was that another module(react-native-stripe) was eating all of my intents and then starting new intents. Apparently React-Native bundles all of the native modules into a single native module so you have to check who the activity referrer is when calling your intent. I'm planning to use patch-package today to check the referrer when onActivityResult is called in react-native-stripe and not execute the logic unless it's coming from itself. Also going to file a bug with react-native-stripe to let them know this is happening.

gulsher7 commented 3 years ago

i don't know what is going on why this library developer not fixed this issue. but if found one solution: pass cropping and compressImageQuality keys in openCamera Object. example:

const onCamera = async () => { try { let image = await ImagePicker.openCamera({ useFrontCamera: false, multiple: false, mediaType: 'photo', cropping: true, -->>>>>add this line compressImageQuality: 0.4, ---->>>add this line maxWidth: 1200, maxHeight: 1200, }) console.log("Image path", image) imageUpload(image.path) } catch (error) { console.log('Image Picker error: ', error) } };

gulsher7 commented 3 years ago

@gulsher7 hey, we are also facing same issue with OPPO and VEVO devices. Did you find some workaround on this?

yes i found some workaround click this link https://github.com/ivpusic/react-native-image-crop-picker/issues/1519#issuecomment-839804273

gulsher7 commented 3 years ago

In my case the issue was that another module(react-native-stripe) was eating all of my intents and then starting new intents. Apparently React-Native bundles all of the native modules into a single native module so you have to check who the activity referrer is when calling your intent. I'm planning to use patch-package today to check the referrer when onActivityResult is called in react-native-stripe and not execute the logic unless it's coming from itself. Also going to file a bug with react-native-stripe to let them know this is happening.

no its not another module problem. its only react-native-image-crop-picker problem. when you set the value of cropping true and compressImageQuality then app not restart.

gulsher7 commented 3 years ago

Still also having the issue with some android devices though cannot spot a common pattern as to why. Not getting any react native errors either.

i found some workaround try this method https://github.com/ivpusic/react-native-image-crop-picker/issues/1519#issuecomment-839804273

gulsher7 commented 3 years ago

please if anyone found better solution please let us know, for a time being try with this https://github.com/ivpusic/react-native-image-crop-picker/issues/1519#issuecomment-839804273

felix4321 commented 3 years ago

@gulsher7 In my case the issue was related to another module (react-native-splash-screen)

gulsher7 commented 3 years ago

@gulsher7 In my case the issue was related to another module (react-native-splash-screen)

so how did you resolved it ? fyi i have not installed splash module yet

tarouboy commented 2 years ago

probably related https://github.com/ivpusic/react-native-image-crop-picker/issues/1557#issuecomment-962878316

saeedtkh commented 2 years ago

any updates?

DaviAugustoMS commented 6 months ago

Has anyone found a solution to this problem, I have this for the Samsungs

c-info commented 2 months ago

Having the same issue on Readmi Note 7 pro with the below configuration on picker

{"avoidEmptySpaceAroundImage": true, "compressImageMaxHeight": 1200, "compressImageMaxWidth": 1200, "compressImageQuality": 0.7, "cropperActiveWidgetColor": "#F90606", "cropperCircleOverlay": true, "cropperStatusBarColor": "#FFFFFF", "cropperToolbarColor": "#FFFFFF", "cropperToolbarWidgetColor": "#F90606", "cropping": true, "freeStyleCropEnabled": true, "includeBase64": false, "mediaType": "photo", "showCropFrame": true, "showCropGuidelines": true}

using

"react": "18.2.0",
"react-native": "0.74.3",
"react-native-image-crop-picker": "^0.41.1",