Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
1.4.0
-
Windows 10 64 bit
{ "cordova-android": "^6.2.3", "cordova-plugin-compat": "^1.0.0", "cordova-plugin-file": "^4.0.0", "cordova-plugin-file-transfer": "^1.6.3", "cordova-plugin-media-capture": "^1.4.3", "cordova-plugin-whitelist": "^1.3.2" }
Java Oracle SDK 1.8 64 bit
Moto G (2nd Gen) Android 6.0
Deps:
"dependencies":,
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-media-capture": {},
"cordova-plugin-file-transfer": {}
},
"platforms": [
"android"
]
}
config.xml:
<content src="index.html" />
<access origin="*" />
<allow-intent href="http:///" />
<allow-intent href="https:///" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
<plugin name="cordova-plugin-media-capture" spec="^1.4.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
AndroidManifest.xml:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
adb logcat:
07-21 15:25:01.984 10495 10656 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2
07-21 15:25:01.984 10495 10656 E AndroidRuntime: Process: com.my.myapp, PID: 10495
07-21 15:25:01.984 10495 10656 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.Uri.isAbsolute()' on a null object reference
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.assertNonRelative(CordovaResourceApi.java:451)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.getUriType(CordovaResourceApi.java:105)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.mapUriToFile(CordovaResourceApi.java:150)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture.createMediaFile(Capture.java:433)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture.onImageActivityResult(Capture.java:382)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture$1.run(Capture.java:329)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
07-21 15:25:02.006 1791 2951 W ActivityManager: Force finishing activity com.my.myapp/.MainActivity
07-21 15:25:02.015 1791 2951 I ActivityManager: moveHomeStack, setupComplete:trueWindows 10 64 bit Java Oracle SDK 1.8 64 bit Moto G (2nd Gen) Android 6.0 Deps: "dependencies": { "cordova-android": "^6.2.3", "cordova-plugin-compat": "^1.0.0", "cordova-plugin-file": "^4.0.0", "cordova-plugin-file-transfer": "^1.6.3", "cordova-plugin-media-capture": "^1.4.3", "cordova-plugin-whitelist": "^1.3.2" } , "cordova": { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-media-capture": {}, "cordova-plugin-file-transfer": {} }, "platforms": [ "android" ] } config.xml: <content src="index.html" /> <access origin="*" /> <allow-intent href="http:// / " /> <allow-intent href="https:// / " /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> <engine name="android" spec="^6.2.3" /> <plugin name="cordova-plugin-file-transfer" spec="^1.6.3" /> <plugin name="cordova-plugin-media-capture" spec="^1.4.3" /> <plugin name="cordova-plugin-whitelist" spec="^1.3.2" /> AndroidManifest.xml: <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_VIDEO" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> adb logcat: 07-21 15:25:01.984 10495 10656 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2 07-21 15:25:01.984 10495 10656 E AndroidRuntime: Process: com.my.myapp, PID: 10495 07-21 15:25:01.984 10495 10656 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.Uri.isAbsolute()' on a null object reference 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.assertNonRelative(CordovaResourceApi.java:451) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.getUriType(CordovaResourceApi.java:105) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.CordovaResourceApi.mapUriToFile(CordovaResourceApi.java:150) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture.createMediaFile(Capture.java:433) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture.onImageActivityResult(Capture.java:382) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at org.apache.cordova.mediacapture.Capture$1.run(Capture.java:329) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 07-21 15:25:01.984 10495 10656 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 07-21 15:25:02.006 1791 2951 W ActivityManager: Force finishing activity com.my.myapp/.MainActivity 07-21 15:25:02.015 1791 2951 I ActivityManager: moveHomeStack, setupComplete:true
Description
Everytime i took a picture (only picture, video mode atm not affected) using media capture plugin my app crashs after i accept the picture. In Transition between Native Camera App and my Cordova app (tried native camera app and google camera app). I include my adb logcat. It has something todo with MediaFile Creation, maybe with my settings. I use Android 6.0 settings in order to treat my sd card as internal storage. I tested my app as cordova native (only cordova) and as a ionic v2 project both have the same mentioned problem. So i think its definitly a problem with your plugin. Please fix this issue, thanks in advance.