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 2019/05/24 15:53:57 UTC
[GitHub] [cordova-plugin-camera] totiherms opened a new issue #460:
getPicture randomly crashes
totiherms opened a new issue #460: getPicture randomly crashes
URL: https://github.com/apache/cordova-plugin-camera/issues/460
# Bug Report
## Problem
The app randomly crashes in ionic v3 when trying to take a picture. I've googled for this issue and tried various proposed solutions, with no success. Majority of them appeals to include correct information in AndroidManifest.xl, regarding to <provider> tag, but I think this part is ok:
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="org.apache.cordova.camera.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/camera_provider_paths" />
</provider>
### What is expected to happen?
The camera takes a picture
### What does actually happen?
The app randomly crashes. Sometimes the picture is taken, sometimes the app crashes with the log
05-24 17:30:43.242 25976 25976 E AndroidRuntime: Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=34, result=-1, data=null} to activity {com.flsida.avhis/com.flsida.avhis.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4597)
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3990)
05-24 17:30:43.242 25976 25976 E AndroidRuntime: ... 11 more
05-24 17:30:43.242 25976 25976 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:591)
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:565)
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:403)
05-24 17:30:43.242 25976 25976 E AndroidRuntime: at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:803)
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
### Command or Code
Accessing camera, simply using
`this.camera.getPicture(options).then((fileUri) => {
}, (err) => {
console.log(err);
});`
### Environment, Platform, Device
Ionic v3, Running on android devices 8 and 9
### Version information
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.6
@ionic/app-scripts : 3.2.2
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 8.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 22 other plugins)
cordova-plugin-camera version 4.0.3
System:
ios-deploy : 1.9.4
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
## 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