Camera is crashing sometimes while retrieving the photo

Hi guys , i’m facing an issue using camera module , its sometimes crash when i press ok to retrieve a photo. this is what my code looks like:

	function takePicture(){
	    picture.value = file
	  }).catch(function(e) {

when press ok to retrieve the photo , if the photo is successfully retrieved , it takes sometimes to re enter the app however it crash immediately

This is from the old version of the API. The object you get is not a file, it’s an “image” object of image data. What you would want in your code is picture.value = file.path.