Wikitude / wikitude-cordova-plugin

Wikitude's Augmented Reality Plugin for Cordova - working together with the Wikitude SDK library for Android and iOS. Provides image recognition and tracking, geo-based augmente reality and 3D rendering and animations in an augmented reality scene
https://www.wikitude.com
Other
201 stars 182 forks source link

Plugin crashes on Android 6.0 + when camera permissions are removed #107

Closed ItsBrianMurphy closed 8 years ago

ItsBrianMurphy commented 8 years ago

Cordova plugin version 4.1.0.

  1. On Android 6 device disable camera permissions to the app
  2. Run app
  3. Open Wikitude plugin

CameraBase: An error occurred while connecting to camera: 0 ArchitectView: Exception while getting Camera Parameters ArchitectView: java.lang.RuntimeException: Fail to connect to camera service ArchitectView: at android.hardware.Camera.(Camera.java:495) ArchitectView: at android.hardware.Camera.open(Camera.java:341) ArchitectView: at com.wikitude.architect.ArchitectView.a(Unknown Source) ArchitectView: at com.wikitude.architect.ArchitectView.onCreate(Unknown Source) ArchitectView: at com.wikitude.phonegap.WikitudePlugin.addArchitectView(WikitudePlugin.java:724) ArchitectView: at com.wikitude.phonegap.WikitudePlugin.access$200(WikitudePlugin.java:58) ArchitectView: at com.wikitude.phonegap.WikitudePlugin$9.run(WikitudePlugin.java:495) ArchitectView: at android.os.Handler.handleCallback(Handler.java:739) ArchitectView: at android.os.Handler.dispatchMessage(Handler.java:95) ArchitectView: at android.os.Looper.loop(Looper.java:148) ArchitectView: at android.app.ActivityThread.main(ActivityThread.java:5417) ArchitectView: at java.lang.reflect.Method.invoke(Native Method) ArchitectView: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) ArchitectView: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) CordovaLog: file:///android_asset/www/js/app-78098d80f6fd94fb11b3ef859378f851.js: Line 63 : Loading AR web view failed: java.lang.RuntimeException: Fail to connect to camera service chromium: [INFO:CONSOLE(63)] "Loading AR web view failed: java.lang.RuntimeException: Fail to connect to camera service", source: file:///android_asset/www/js/app-78098d80f6fd94fb11b3ef859378f851.js (63)

AndreasSchacherbauerWikitude commented 8 years ago

I assume this happens with your own application and not with the Wikitude Cordova example application? I just tried our example application on Android 6+ devices and it works fine if you deny the camera permission. Do you use our latest Cordova Plugin which was released ~2 weeks ago?

ItsBrianMurphy commented 8 years ago

No, we're using version 4.1.0. I see the release note for v5.1.1-3.2.0 about the Android Runtime Permissions. We'll update, check it out and I imagine we'll close this off. Thanks for the prompt reply!

ItsBrianMurphy commented 8 years ago

Test app with version 5.1 doesn't crash with permissions removed.