React-native-image-crop-picker: Possible Unhandled Promise Rejection when upload image with emulator of API LEVEL 29

Created on 4 Jun 2020  路  3Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Following warning is showing when try to upload image in emulator with latest API level that is 29:

Possible Unhandled Promise Rejection (id: 1):
Error: Properties cannot be serialized. Object must only contain strings
Error: Properties cannot be serialized. Object must only contain strings
at D:.....reactindex.bundle:98427:17
at Array.forEach ()
at sanitizeProperties (D:......reactindex.bundle:98415:24)
at Object.trackEvent (D:......reactindex.bundle:98295:66)
at LogError$ (D:......vscode.reactindex.bundle:96520:45)
at tryCatch (D:......vscode.reactindex.bundle:1455:19)
at Generator.invoke [as _invoke] (D:......reactindex.bundle:1631:24)
at Generator.prototype.(anonymous function) [as next] (D:......reactindex.bundle:1498:23)
at tryCatch (D:......reactindex.bundle:1455:19)
at invoke (D:......reactindex.bundle:1531:22)

  • react-native-image-crop-picker v0.24.1
  • react-native v0.59.9

Platform - Android

Steps to reproduce

  1. Select image from gallery and suddenly it will show 2 seconds crop image screen then close
    crop image screen and navigate to screen

i have changes build.gradle file of react-native-image-crop-picker with
compileSdkVersion = 29
targetSdkVersion = 29

but not worked.
and showing warning that i shared above when do upload image from gallery
err
.
and this exception came

code:"E_NO_IMAGE_DATA_FOUND"
framesToPop:1
message:"Cannot find image data"
nativeStackAndroid:Array(0) []
stack:"Error: Cannot find image data

Can you give me any solution for this?

Thanks,
Manoj

Most helpful comment

@manojshrimalla try adding this to your android manifest in the application section
android:requestLegacyExternalStorage="true"

All 3 comments

@manojshrimalla try adding this to your android manifest in the application section
android:requestLegacyExternalStorage="true"

thanks @jcharbo , it's worked... you have saved my lot of time. Thank you

I Also face error in React native 0.59.9 and react-native-image-crop-picker v0.24.1
Error : E_NO_IMAGE_DATA_FOUND android 10
Step 1: when select image with crop option for gallery image
Error : E_FAILED_TO_OPEN_CAMERA
Step 1: when open camera
please suggest me

Was this page helpful?
0 / 5 - 0 ratings