cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

IOS13.2 Taking a quick photo shows black and 'Use photo' doesn't return success/error callback

Open karlsc opened this issue 6 years ago • 5 comments

Bug Report

Problem

What is expected to happen?

A quick selection should take a normal picture, and using it should return the success/error callback.

What does actually happen?

On opening the plugin, click quickly on 'Take photo' (like very quickly), the photo is a black screen. Clicking on 'Use photo' will close the plugin but will not properly call the success/error callback

Environment, Platform, Device

Only repro on iOS13.2

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

karlsc avatar Nov 07 '19 19:11 karlsc

Hello, I have the same problem. Do you manage to make it works?

DimitriMathot avatar Nov 22 '19 15:11 DimitriMathot

This is a common issue if you're using the DATA_URL destination.

breautek avatar Nov 22 '19 15:11 breautek

Hello, I have the same problem. Do you manage to make it works?

No luck so far!

This is a common issue if you're using the DATA_URL destination.

What do you mean? Is there a work around?

karlsc avatar Nov 22 '19 16:11 karlsc

If you use DATA_URL, I would try using FILE_URI instead.

I explain why in more detail in another thread here: https://github.com/apache/cordova-plugin-camera/issues/528#issuecomment-556095740

But TL;DR version is, you're probably seeing a black screen because the javascript is too busy encoding the image in a base64 encoded string which is very inefficient and with modern phones are rather large.

If you wait long enough it will eventually finish creating the base64 string or it will crash due to memory constraints.

breautek avatar Nov 22 '19 16:11 breautek

If you use DATA_URL, I would try using FILE_URI instead.

I explain why in more detail in another thread here: #528 (comment)

But TL;DR version is, you're probably seeing a black screen because the javascript is too busy encoding the image in a base64 encoded string which is very inefficient and with modern phones are rather large.

If you wait long enough it will eventually finish creating the base64 string or it will crash due to memory constraints.

That did not fix it, sadly.

karlsc avatar Nov 25 '19 18:11 karlsc