You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/12/10 04:39:20 UTC

[GitHub] [cordova-plugin-camera] blukis opened a new issue #696: App crashes when image returned via resume event, Android

blukis opened a new issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696


   # Bug Report
   
   ## Problem
   Per "android quirks" section of readme, camera may return imageData via cordova "resume" event, when Android closes main app while camera is open.  I'm triggering this scenario manually using Android settings > System > Developer Options > "Don't keep activities".  In cordova-plugin-camera 4.1.0 imageData is returned per docs via "resume" event.  In cordova-plugin-camera 5.0.1, app crashes just after taking a picture, and before/as app is restored.
   
   ### What is expected to happen?
   App should not crash when it restores, per scenario above.  (Works per documentation in version 4.1.0)
   
   
   ### What does actually happen?
   App crashes after taking a picture.
   
   ## Information
   - version 4.1.0 works per docs
   - App doesn't appear to launch again at all.  (e.g. crash happens, and an alert("x") on the first line of JS never fires.)
   
   ### Command or Code
   - Camera call I'm using:
   ```
   	navigator.camera.getPicture(
   		function (imageData) { alert("Camera callback, normal way."); },
   		function (msg) { alert('Camera error: ' + msg); },  // Error CB
   		{ quality:95, sourceType:Camera.PictureSourceType.CAMERA, destinationType:Camera.DestinationType.FILE_URI, correctOrientation:true, allowEdit:false, targetWidth:2000, targetHeight:2000 }
   	);
   ```
   - I'm triggering this "manually" using [Android settings > System > Developer Options > "Don't keep activities"].  That setting is important to triggering this issue.  Unless there's another way to reliably trigger the "android quirks" scenario.
   
   
   ### Environment, Platform, Device
   Voltbuilder // Android // Sony Xperia ZX2 Compact
   
   
   ### Version information
   Building with Voltbuilder.  I didn't specify a cordova version, so I assume they're using something recent. 
   
   
   ## Checklist
   - [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



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


[GitHub] [cordova-plugin-camera] PieterVanPoyer commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
PieterVanPoyer commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-769653327


   > Hi @PieterVanPoyer ,
   > 
   > After using this plugin npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug android crash issue fixed, but my app is restarting again sometimes, when i click photo what is the issue, my device is android 10.
   
   Restarting is perfectly normal in Android when the app goes in the background. For more information see: https://github.com/apache/cordova-plugin-camera/issues/665#issuecomment-757835110


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] ingluisfelipemunoz commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
ingluisfelipemunoz commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-758538033


   > @blukis I think you are absolutely right, the described scenario resulted in an error and a plugin crash. I did make a change and a Pull Request to the Android plugin code. You can install the fork with next command. Are you able to test my fork?
   > 
   > ```
   > npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug
   > ```
   > 
   > First remove the old plugin offcourse.
   
   Thanks, that works for me!!!


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] breautek closed issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
breautek closed issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696


   


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] blukis commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
blukis commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-756280963


   Unfortunately, as I only use VoltBuilder (where they only allow manually-approved plugins from npm), I'm unable to test.  Thank you for the fix!


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] FlossyWeb commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
FlossyWeb commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-760972275


   I too have this problem on a Samsung S20, I think it is probably related to Android 11.
   As I also use VoltBuilder, I will have to wait for you guys to update the plugin on npm...


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] PieterVanPoyer commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
PieterVanPoyer commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-752954220


   @blukis  are you able to test my fork? I did make a change to the Android plugin code. You can install the fork with next command
   
   ````
   npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug
   ````


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] satheeshkumartitan edited a comment on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
satheeshkumartitan edited a comment on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-849467126


   I've also updated the latest plugin 5.0.2, but the same problems occur on Android 10 (device - redmi note 7pro). The plugin 5.0.2. Forcefully close the application once we capture a photo. This happens on some specific devices. Please update the new version I'm waiting for the new version
   Node -v ----14.16.0
   ionic -v ---- 6.13.1
   cordova -v----10.0.0
   ionic cordova platform add android@9.1.0
   npm i @ionic-native/camera@5.33.0
   tested and both same crash.
   
   I'm waiting for your response, thanks


-- 
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



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


[GitHub] [cordova-plugin-camera] breautek closed issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
breautek closed issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696


   


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] PieterVanPoyer edited a comment on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
PieterVanPoyer edited a comment on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-752954220


   @blukis I think you are absolutely right, the described scenario resulted in an error and a plugin crash. I did make a change and a Pull Request to the Android plugin code. You can install the fork with next command. Are you able to test my fork?
   
   ````
   npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug
   ````
   First remove the old plugin offcourse.


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] sachinsemlety commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
sachinsemlety commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-769623165


   Hi @PieterVanPoyer ,
   
   After using this plugin npx cordova plugin add https://github.com/PieterVanPoyer/cordova-plugin-camera/#bugfix/issue-665-save-instance-restore-bug android crash issue fixed, but my app is restarting again sometimes, when i click photo  what is the issue, my device is android 10.
   


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] PieterVanPoyer commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
PieterVanPoyer commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-756215230


   @blukis are you able to test this? Kind regards Pieter


----------------------------------------------------------------
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



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


[GitHub] [cordova-plugin-camera] satheeshkumartitan commented on issue #696: App crashes when image returned via resume event, Android

Posted by GitBox <gi...@apache.org>.
satheeshkumartitan commented on issue #696:
URL: https://github.com/apache/cordova-plugin-camera/issues/696#issuecomment-849467126


   I've also updated the latest plugin 5.0.2, but the same problems occur on Android 10 (device - redmi not 7pro). The plugin 5.0.2. Forcefully close the application once we capture a photo. This happens on some specific devices. Please update the new version I'm waiting for the new version
   Node -v ----14.16.0
   ionic -v ---- 6.13.1
   cordova -v----10.0.0
   ionic cordova platform add android@9.1.0
   npm i @ionic-native/camera@5.33.0
   tested and both same crash.
   
   I'm waiting for your response, thanks


-- 
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



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