Skip to content
Advertisement

Error: Call to function ‘ExponentImagePicker.launchCameraAsync’ has been rejected

I’m trying to to make the user take a photo with “expo-image-picker” module using the “launchCameraAsync” function, and at first everything worked out fine, but now when trying to make the user take a photo, expo throws an warning and does not activate the camera, the warning is:

Possible Unhandled Promise Rejection (id: 0): Error: Call to function ‘ExponentImagePicker.launchCameraAsync’ has been rejected. → Caused by: java.lang.RuntimeException: Can’t create handler inside thread Thread[DefaultDispatcher-worker-2,5,main] that has not called Looper.prepare()

The code section responsible for this error is:

JavaScript

I believe the error may be due to incompatibility with other expo modules but I’m not sure because I have not updated or changed the modules in my app, either way here are the versions of what I believe are the relevant modules.

JavaScript

Advertisement

Answer

I also face the same problem just yesterday. and everything solve when I clear the memory of the app. you can try if its work for you too

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement