Camera.getPicture() - Success Promise not fired until second call of Camera.getPicture()

Hi.

I have a bug with the Camera plugin (native plugin).

Here is my code:
http://pastebin.com/Sr6FvErA

When I click on my button. Camera will open and I can take a picture. Everything is ok till now. But, when the Camera app closes, the success Promise is not fired. So “this.picture” is never updated with the base64 string.

But when I click again on my button and call Camera.getPicture() again, the success Promise is called directly and then the picture is updated with base64 string from my first call of Camera.getPicture().

Scheme:

  1. Camera.getPicture() is called
  2. The Camera app launch
  3. I take a picture and I confirm
  4. The Camera app close and I come back on my app
  5. But (imageData) => { this.picture = ‘data:image/jpeg;base64,’ + imageData; } is not called
  6. I called Camera.getPicture() for the second time
  7. Before Camera app opening, the callback is fired and the picture is updated with base64 string of last picture I took
  8. After, the Camera app will launch normally.

My configuration:
ionic: 2.1.18
cordova: 6.4.0

cordova-plugin-camera: 2.3.0
ionic-angular: 2.0.0-rc.4
ionic-native: 2.2.13

Thank you in advance.

Hmm, I just gave it a shot, and it seems to be working fine on my end.
As soon as I took the picture, I was able to edit the photo, and then process the data change.

mhartington. With the same configuration as me ? Or other ? Can I have your conf pls ?

Solved. Restarting on a fresh install of ionic project and its working now. Ty :wink: