React-native-image-crop-picker: Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

Created on 1 Nov 2020  路  2Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v^0.35.1
  • react-native v0.63.3

Platform

Tell us to which platform this issue is related

  • Android

Expected behaviour

Open Camera Picker

Actual behaviour

Got Error when ImagePicker.openCamera() is pressed

[Sun Nov 01 2020 16:18:25.873] ERROR Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

[[40,37],[2,0],[[25,100,1604218705565,false]],583]

Steps to reproduce

  1. npm i react-native-image-crop-picker --save

  2. npx react-native start

  3. npx react-native run-android

Attachments

It said the source came from NativeModule.js

// stacktrace or any other useful debug info

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

photo_2020-11-01_16-23-28

Most helpful comment

facing same issue

All 2 comments

facing same issue

Hi, @viralwebelight @muhdlaziem I solved this issue by changing to promise on Class ImagePicker

Was :

ImagePicker.openCamera(
      {
        width: 1024,
        height: 720,
        includeBase64: true,
      },
      (response) => {
         .......
      }
    );

Now :

ImagePicker.openCamera({
      width: 1024,
      height: 720,
      includeBase64: true,
    }).then((response) => {
      ......
    });

I hope this solution solve your problem 馃槈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

habovh picture habovh  路  3Comments

Martian2Lee picture Martian2Lee  路  3Comments

DISKONEKTeD picture DISKONEKTeD  路  3Comments

leelandclay picture leelandclay  路  3Comments

Phenek picture Phenek  路  3Comments