react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

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

Open gulsher7 opened this issue 4 years ago • 21 comments

Version

Tell us which versions you are using:

  • react-native-image-crop-picker 0.9.3
  • react-native 0.63.4

Platform

Tell us to which platform this issue is related

  • Android(Redmin Note 7 Pro)

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

gulsher7 avatar Jan 23 '21 14:01 gulsher7

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

prtkkmrsngh avatar Feb 08 '21 07:02 prtkkmrsngh

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

akanksha-agarwal93 avatar Feb 10 '21 07:02 akanksha-agarwal93

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

hagar0459 avatar Feb 17 '21 20:02 hagar0459

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.

lewisbird avatar Feb 22 '21 15:02 lewisbird

Same here

mrsasuu avatar Feb 23 '21 14:02 mrsasuu

Can be related to #1509 and #1526?

mrsasuu avatar Feb 23 '21 14:02 mrsasuu

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

akanksha-agarwal93 avatar Feb 25 '21 10:02 akanksha-agarwal93

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

radadiyarushita avatar Mar 27 '21 15:03 radadiyarushita

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",

felix4321 avatar Apr 17 '21 07:04 felix4321

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.

syntacticsolutions avatar Apr 21 '21 18:04 syntacticsolutions

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 avatar May 12 '21 14:05 gulsher7

@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 avatar May 12 '21 14:05 gulsher7

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 avatar May 12 '21 14:05 gulsher7

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 avatar May 12 '21 14:05 gulsher7

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

gulsher7 avatar May 12 '21 14:05 gulsher7

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

felix4321 avatar May 12 '21 14:05 felix4321

@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

gulsher7 avatar May 12 '21 15:05 gulsher7

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

tarouboy avatar Nov 26 '21 08:11 tarouboy

any updates?

saeedtkh avatar May 10 '22 11:05 saeedtkh