willemjanvankranenburg opened a new issue #758: URL: https://github.com/apache/cordova-plugin-camera/issues/758
# Bug Report ## Problem ### What is expected to happen? I expect my Ionic app to still be runing and getting the correct result when taking a picture using the camera plugin. Most of the times this works as intended ### What does actually happen? Sometimes the app restarts completely. ## Information The logs I've gathered using logcat and a Honeywell EDA71-1: ``` // WHEN EVERY THING GOES AS EXPECTED 08-30 16:57:35.774 23886 24172 W PluginManager: THREAD WARNING: exec() call to Camera.takePicture blocked the main thread for 70ms. Plugin should use CordovaInterface.getThreadPool(). 08-30 16:57:35.776 23886 23886 D CordovaActivity: Paused the activity. 08-30 16:57:36.785 23886 23886 D CordovaActivity: Stopped the activity. 08-30 16:57:41.627 23886 23886 D CordovaActivity: Incoming Result. Request code = 33 08-30 16:57:41.627 23886 23886 D CordovaInterfaceImpl: Sending activity result to plugin 08-30 16:57:42.036 23886 23886 D CordovaActivity: Started the activity. 08-30 16:57:42.039 23886 23886 D CordovaActivity: Resumed the activity. 08-30 16:57:42.111 23886 24003 D SERVER : Handling local request: http://localhost/assets/icon/favicon.png 08-30 16:57:42.111 23886 23886 D NetworkManager: toLower : wifi 08-30 16:57:42.111 23886 23886 D NetworkManager: wifi : wifi 08-30 16:57:42.111 23886 23886 D NetworkManager: Connection Type: wifi 08-30 16:57:42.111 23886 23886 D NetworkManager: Connection Extra Info: null 08-30 16:57:42.309 23886 24003 D SERVER : Handling local request: http://localhost/assets/icon/favicon.png // WHEN THE APP RESTARTS 08-30 16:57:44.081 23886 24172 W PluginManager: THREAD WARNING: exec() call to Camera.takePicture blocked the main thread for 26ms. Plugin should use CordovaInterface.getThreadPool(). 08-30 16:57:44.084 23886 23886 D CordovaActivity: Paused the activity. 08-30 16:57:44.714 23886 23886 D CordovaActivity: Stopped the activity. 08-30 16:57:47.359 1534 8868 I ActivityManager: Process <package.id> (pid 23886) has died: prev LAST 08-30 16:57:47.359 1534 1598 I libprocessgroup: Successfully killed process cgroup uid 10176 pid 23886 in 0ms 08-30 16:57:47.360 994 994 I Zygote : Process 23886 exited due to signal 9 (Killed) 08-30 16:57:47.378 1534 1589 W ActivityManager: setHasOverlayUi called on unknown pid: 23886 ``` ### Command or Code <!-- What command or code is needed to reproduce the problem? --> ```javascript // Camera options this.defaultCameraOptions = { quality: 80, destinationType: DestinationType.DATA_URL, encodingType: EncodingType.JPEG, mediaType: MediaType.PICTURE, targetHeight: 1000, targetWidth: 1000, correctOrientation: true, saveToPhotoAlbum: false, cameraDirection: 0, sourceType: PictureSourceType.CAMERA }; const cameraResult: string = await this.camera.getPicture(this.defaultCameraOptions); let resultBase64: string = ''; if (cameraResult) { resultBase64 = 'data:image/jpeg;base64,' + cameraResult; } console.log(resultBase64); ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Ionic, android 10. Different devices. Honeywell EDA71-1, Zebra TC75 ### 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. --> Ionic CLI (ionic -v): 6.12.1 cordova (cordova -v): 9.0.0 @ionic/angular: 5.2.3 @ionic-native/camera: 5.27.0 cordova-android: 8.1.0 cordova-plugin-camera: 5.0.3, ## 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
