You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/16 22:44:24 UTC

[GitHub] [cordova-plugin-camera] jfoclpf opened a new issue #548: Plugin crashes when using PHOTOLIBRARY on Android

jfoclpf opened a new issue #548: Plugin crashes when using PHOTOLIBRARY on Android
URL: https://github.com/apache/cordova-plugin-camera/issues/548
 
 
   # Bug Report
   
   ## Problem
   
   When obtaining some pictures on the phone file system using `PHOTOLIBRARY`, particularly image files stored in `/Phone/Download`, the app crashes. Normally it does work, but it seems in some folders the app crashes
   
   ### What is expected to happen?
   
   The function `camera.getPicture(successCallback, errorCallback, options)` should run the function `successCallback` 
   
   ### What does actually happen?
   
   When the function `camera.getPicture(successCallback, errorCallback, options)` is called, wherein options has `sourceType:Camera.PictureSourceType.PHOTOLIBRARY`,  the app crashes when I select certain files
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   ```js
       var options = {
         quality: 50,
         destinationType: Camera.DestinationType.FILE_URI,
         sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
         encodingType: Camera.EncodingType.JPEG,
         mediaType: Camera.MediaType.PICTURE,
         allowEdit: false,
         correctOrientation: true // Corrects Android orientation quirks
       }
   
       console.log('starting navigator.camera.getPicture') // this is shown
       navigator.camera.getPicture(function (result) {
         console.log('cameraSuccess init') // this is never shown, it crashes before
         cameraSuccess(result)
       },
       function cameraError (error) {
         console.debug('error getting photo: ' + error, 'app') // this is not shown either, the app just crashes
       }, options)
   ```
   
   ### Screenshots
   
   <img src="https://user-images.githubusercontent.com/3984909/72568668-f2fc9980-38b8-11ea-870a-3e22b1f05425.jpg" alt="drawing" width="200"/>
   <img src="https://user-images.githubusercontent.com/3984909/72568669-f2fc9980-38b8-11ea-83f9-2ba1d02421a0.jpg" alt="drawing" width="200"/>
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Android, Samsung Galaxy A5
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   Cordova: 9.0.0 (cordova-lib@9.0.1)
   
   #### Plugins
   ```
   cordova-pdf-generator 2.0.8 "PDFGenerator"
   cordova-plugin-camera 4.0.3 "Camera"
   cordova-plugin-compat 1.2.0 "Compat"
   cordova-plugin-device 2.0.3 "Device"
   cordova-plugin-email-composer 0.8.15 "EmailComposer"
   cordova-plugin-file 6.0.1 "File"
   cordova-plugin-file-transfer 1.7.1 "File Transfer"
   cordova-plugin-geolocation 2.4.3 "Geolocation"
   cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
   cordova-plugin-mobile-ocr 3.1.1 "Textocr"
   cordova-plugin-network-information 2.0.2 "Network Information"
   cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
   cordova-plugin-simple-image-resizer 0.1.1 "Image Resizer"
   cordova-plugin-statusbar 2.4.3 "StatusBar"
   cordova-plugin-whitelist 1.3.4 "Whitelist"
   es6-promise-plugin 4.2.2 "Promise"
   info.protonet.imageresizer 0.1.1 "Image Resizer"
   ```
   
   #### Java
   ```
   java version "1.8.0_131"
   Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
   Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
   ```
   
   #### adb
   ```
   Android Debug Bridge version 1.0.41
   Version 29.0.1-5644136
   Installed as /usr/local/android-sdk/platform-tools/adb
   ```
   
   ## 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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-camera] jfoclpf commented on issue #548: Plugin crashes when using PHOTOLIBRARY on Android

Posted by GitBox <gi...@apache.org>.
jfoclpf commented on issue #548: Plugin crashes when using PHOTOLIBRARY on Android
URL: https://github.com/apache/cordova-plugin-camera/issues/548#issuecomment-576314797
 
 
   What is very strange is that, when I get exactly the same picture but obtained through folder "Recent" in Android file Explorer opened by this plugin, the app does not crash.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org