Closed magrinj closed 8 years ago
@magrinj are you passing cropping: true
flag? What phone you are using?
Yes I pass cropping: true
, the phone I use is a Motorola Moto E, with the version of image-crop-picker 5.5.0 that's working, I don't really understand why
Hm, I don't have that phone, and on mine phones it works. your version is using newer ucrop (2.1.2). Can you try to put compile 'com.yalantis:ucrop:1.5.0'
instead of compile 'com.yalantis:ucrop:2.1.2'
and see if it works
Ok I'm going to try, I let you know
Same error with the version 1.5.0
of ucrop
. I don't really understand what's happen :/
Edit: Cropping works on iOS, the problem is only on Android
do you get any stacktrace which could be useful for debugging?
The stack trace I got is in the catch of ImageCropPicker, and I got this:
error:
{ "framesToPop": 1, "code": "E_ACTIVITY_DOES_NOT_EXIST" }
stack trace:
can you run project within android studio, and give me stacktrace from there?
09-10 15:41:09.223: E/qomx_image_core(341): OMX_Deinit:119] Complete
09-10 15:41:09.226: E/QCameraPostProc(341): int32_t qcamera::QCameraPostProcessor::deinit(): Jpeg closed, rc = 0, mJpegClientHandle = a400
09-10 15:41:09.255: E/libEGL(17347): call to OpenGL ES API with no current context (logged once per thread)
Having the same issue, hopefully this is the relevant part of the stacktrace
Also seeing this quite a lot
09-10 15:48:10.223: E/Surface(1876): getSlotFromBufferLocked: unknown buffer: 0xb94a2208
Took out the cropping: true
option and caught this:
09-11 15:53:35.865: E/BitmapFactory(4930): Unable to decode stream: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
09-11 15:53:35.884: E/AndroidRuntime(4930): FATAL EXCEPTION: main
09-11 15:53:35.884: E/AndroidRuntime(4930): Process: com.challengr, PID: 4930
09-11 15:53:35.884: E/AndroidRuntime(4930): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=null} to activity {com.challengr/com.challengr.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread.deliverResults(ActivityThread.java:3720)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread.-wrap16(ActivityThread.java)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.os.Handler.dispatchMessage(Handler.java:102)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.os.Looper.loop(Looper.java:148)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread.main(ActivityThread.java:5443)
09-11 15:53:35.884: E/AndroidRuntime(4930): at java.lang.reflect.Method.invoke(Native Method)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
09-11 15:53:35.884: E/AndroidRuntime(4930): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
09-11 15:53:35.884: E/AndroidRuntime(4930): at java.io.File.fixSlashes(File.java:183)
09-11 15:53:35.884: E/AndroidRuntime(4930): at java.io.File.<init>(File.java:130)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.reactnative.ivpusic.imagepicker.PickerModule.getBase64StringFromFile(PickerModule.java:171)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.reactnative.ivpusic.imagepicker.PickerModule.getImage(PickerModule.java:218)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.reactnative.ivpusic.imagepicker.PickerModule.cameraPickerResult(PickerModule.java:290)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.reactnative.ivpusic.imagepicker.PickerModule.onActivityResult(PickerModule.java:313)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:210)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.facebook.react.XReactInstanceManagerImpl.onActivityResult(XReactInstanceManagerImpl.java:595)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:147)
09-11 15:53:35.884: E/AndroidRuntime(4930): at com.challengr.MainActivity.onActivityResult(MainActivity.java:26)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.Activity.dispatchActivityResult(Activity.java:6442)
09-11 15:53:35.884: E/AndroidRuntime(4930): at android.app.ActivityThread.deliverResults(ActivityThread.java:3716)
09-11 15:53:35.884: E/AndroidRuntime(4930): ... 9 more
@morelazers @magrinj please try new release https://github.com/ivpusic/react-native-image-crop-picker/releases/tag/v0.8.3. It includes improvements related to cropping.
Please let me know how it works for you.
@ivpusic works, thank you so much! Not sure what the problem was, but I also have a Motorola phone (Moto G 2015) if it's relevant :)
@ivpusic Hi, sorry for commenting at the closed issue, but I encounter the similar problem here. I wonder what modification of your new release about this problem?
Version
Tell us which versions you are using:
Expected behaviour
After I select a picture on android, normally the next view with cropping would appear.
Actual behaviour
Just after I select a picture on android I can't crop my picture, when I select it, the view go back to the last view and that's it.
Steps to reproduce
Attachments
{ "framesToPop": 1, "code": "E_ACTIVITY_DOES_NOT_EXIST" }