cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [cordova-plugin-camera] vratislavino opened a new issue #590: getPicture() fails with Ionic
Date Sat, 02 May 2020 23:31:54 GMT

vratislavino opened a new issue #590:

   # Bug Report
   ## Problem
   ### What is expected to happen?
   I expected camera plugin to return BASE64 data so I can send it and save it on server.
   ### What does actually happen?
   On device, fails with error message:
   > Cannot read property 'present' of undefined
   Same thing happens if I use CAMERA or PHOTOLIBRARY as sourceType
   ### Command or Code
   `import { Camera } from '@ionic-native/camera/ngx';`
   injected in constructor
   `constructor(public camera: Camera) { }`
   and then used in my upload() method
   let options = {
         quality: 100,
         saveToPhotoAlbum: false,
         correctOrientation: false
   }; => {
   let base64Image = 'data:image/jpeg;base64,' + imageData;
       }).catch(err => {
   ### Environment, Platform, Device
   Not depending on device, happened on multiple devices wit different versions, eg.
   Xiaomi Mi 8 - Android 10
   Samsung Galaxy A3 - Android 6
   ### Version information
   Ionic 5.4.16
   Cordova: 9.0.0 (cordova-lib@9.0.1)
   cordova-plugin-camera 4.1.0 "Camera"
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   - [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

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message