-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: Android app is restarting every time we access a plugin (share/camera/ library etc) #4130
Comments
Related #2584 ? |
Related #2931 ? |
Do you have |
Hey @jcesarmobile , thanks for the reply. I dont have that option enabled, I also disabled developer tools and tried again with the same issue. From what you are saying I can try in other Android phones and everything should be working fine? |
The phone I am using and having this issue is Samsung A10 - with 2G Memory and 32G storage, I dont think so this would be memory issues. @jcesarmobile I am having some cordova plugins, could this impact on this? |
Hey @jcesarmobile does the launchMode=singleTask on AndroidManifest.xml would impact on this? Shoul dbe multiTask? |
I found out the issue, on Network state change which is triggered on android app when calling capacitor plugin on resuming the app we had a reload of location.... |
cf #2712 |
@joaolnpr how did you fixed it in details ? Looks like it's a comon crash with android apps since one year |
hi @joaolnpr how did you fix that ? thanks in advance! |
I am also facing crashing issue on taking picture, I am using realme device , android version -12. I tried capacitor 3.5.1 and 4 as well but same issue. please resolve it. |
A workaround for better camera stability on android is to use an html "capture" |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Platform(s)
Android
Current Behavior
Every time we access to a capacitor plugin the app restarts, Share, Camera or Library, all of them facing same issue.
Expected Behavior
The app should not restart once we access a plugin
Code Reproduction
Video: After we share, the app is restarting:
WhatsApp.Video.2021-01-29.at.14.14.59.mp4
Other Technical Details
npm --version
output: 6.13.4node --version
output: v12.14.0pod --version
output (iOS issues only):Additional Context
LOG Cat from Android Studio:
`2021-01-29 14:17:12.294 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: ViewPostIme pointer 0
2021-01-29 14:17:12.308 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: ViewPostIme pointer 1
2021-01-29 14:17:12.338 2503-2569/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/assets/fonts/Barlow-SemiBold.ttf
2021-01-29 14:17:12.346 2503-2503/com.flowrobe.app D/InputMethodManager: HSIFW - flag : 0 Pid : 2503
2021-01-29 14:17:13.767 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: ViewPostIme pointer 0
2021-01-29 14:17:13.810 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: ViewPostIme pointer 1
2021-01-29 14:17:13.830 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 36488273, pluginId: Share, methodName: share
2021-01-29 14:17:13.831 2503-2715/com.flowrobe.app V/Capacitor: callback: 36488273, pluginId: Share, methodName: share, methodData: {"title":"Share your FlowRobe love 🔥❤","text":"Check out FlowRobe where you can swipe nice clothes, upload easier than ever, and give preloved new lives! 🙈👟♻ \n 👉🏽 ","url":"http://flowrobe.com/app","dialogTitle":"Share your FlowRobe love 🔥❤"}
2021-01-29 14:17:13.846 2503-2503/com.flowrobe.app D/InputMethodManager: HSIFW - flag : 0 Pid : 2503
2021-01-29 14:17:13.865 2503-2503/com.flowrobe.app D/Capacitor: App paused
2021-01-29 14:17:13.880 2503-2503/com.flowrobe.app I/Capacitor/Console: File: http://localhost/main-es2015.js - Line 855 - Msg: Successful share [object Object]
2021-01-29 14:17:13.982 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
2021-01-29 14:17:13.982 2503-2503/com.flowrobe.app D/InputMethodManager: prepareNavigationBarInfo() DecorView@30c61b[MainActivity]
2021-01-29 14:17:13.983 2503-2503/com.flowrobe.app D/InputMethodManager: getNavigationBarColor() -855310
2021-01-29 14:17:14.149 2503-2503/com.flowrobe.app D/InputMethodManager: HSIFW - flag : 0 Pid : 2503
2021-01-29 14:17:14.881 2503-2503/com.flowrobe.app D/InputTransport: Input channel destroyed: 'ClientS', fd=173
2021-01-29 14:17:16.336 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: stopped(false) old=false
2021-01-29 14:17:16.337 2503-2503/com.flowrobe.app D/Capacitor/App: Firing change: true
2021-01-29 14:17:16.338 2503-2503/com.flowrobe.app V/Capacitor/App: Notifying listeners for event appStateChange
2021-01-29 14:17:16.338 2503-2503/com.flowrobe.app D/Capacitor/App: No listeners found for event appStateChange
2021-01-29 14:17:16.367 2503-2503/com.flowrobe.app D/Capacitor: App resumed
2021-01-29 14:17:16.370 2503-2503/com.flowrobe.app D/ViewRootImpl@4d8758f[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2021-01-29 14:17:16.370 2503-2503/com.flowrobe.app D/InputMethodManager: prepareNavigationBarInfo() DecorView@30c61b[MainActivity]
2021-01-29 14:17:16.370 2503-2503/com.flowrobe.app D/InputMethodManager: getNavigationBarColor() -855310
2021-01-29 14:17:16.379 2503-2503/com.flowrobe.app D/InputMethodManager: prepareNavigationBarInfo() DecorView@30c61b[MainActivity]
2021-01-29 14:17:16.380 2503-2503/com.flowrobe.app D/InputMethodManager: getNavigationBarColor() -855310
2021-01-29 14:17:16.380 2503-2503/com.flowrobe.app V/InputMethodManager: Starting input: tba=com.flowrobe.app ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2021-01-29 14:17:16.380 2503-2503/com.flowrobe.app D/InputMethodManager: startInputInner - Id : 0
2021-01-29 14:17:16.381 2503-2503/com.flowrobe.app I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2021-01-29 14:17:16.387 2503-2503/com.flowrobe.app V/Capacitor/Network: Notifying listeners for event networkStatusChange
2021-01-29 14:17:16.405 2503-2569/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/home
2021-01-29 14:17:16.519 2503-2569/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/polyfills-es2015.js
2021-01-29 14:17:16.521 2503-2576/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/styles-es2015.js
2021-01-29 14:17:16.521 2503-2569/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/vendor-es2015.js
2021-01-29 14:17:16.521 2503-2578/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/runtime-es2015.js
2021-01-29 14:17:16.524 2503-2570/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/main-es2015.js
2021-01-29 14:17:16.552 2503-2503/com.flowrobe.app I/Capacitor/Console: File: capacitor-runtime.js - Line 2398 - Msg: onscript loading complete
2021-01-29 14:17:17.205 2503-2503/com.flowrobe.app W/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 168790 - Msg:
It looks like you're using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK components you intend to use.
2021-01-29 14:17:17.325 2503-2503/com.flowrobe.app W/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 39262 - Msg: DEPRECATED: DI is instantiating a token "CustomHammerConfig" that inherits its @Injectable decorator but does not provide one itself.
This will become an error in v10. Please add @Injectable() to the "CustomHammerConfig" class.
2021-01-29 14:17:17.377 2503-2576/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/firebase-auth-es2015.js
2021-01-29 14:17:17.379 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 119405112, pluginId: Storage, methodName: get
2021-01-29 14:17:17.379 2503-2715/com.flowrobe.app V/Capacitor: callback: 119405112, pluginId: Storage, methodName: get, methodData: {"key":"user"}
2021-01-29 14:17:17.466 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 119405113, pluginId: Network, methodName: getStatus
2021-01-29 14:17:17.466 2503-2715/com.flowrobe.app V/Capacitor: callback: 119405113, pluginId: Network, methodName: getStatus, methodData: {}
2021-01-29 14:17:17.488 2503-2503/com.flowrobe.app I/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 75107 - Msg: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
2021-01-29 14:17:17.504 2503-2570/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/common-es2015.js
2021-01-29 14:17:17.518 2503-2575/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/2-es2015.js
2021-01-29 14:17:17.522 2503-2849/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/6-es2015.js
2021-01-29 14:17:17.534 2503-2575/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/17-es2015.js
2021-01-29 14:17:17.548 2503-2576/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/default~pages-home-home-module~product-product-module~trades-trades-module~wardrobe-wardrobe-module~~fddc403d-es2015.js
2021-01-29 14:17:17.548 2503-2578/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/19-es2015.js
2021-01-29 14:17:17.552 2503-2849/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/pages-home-home-module-es2015.js
2021-01-29 14:17:17.558 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 119405114, pluginId: Network, methodName: addListener
2021-01-29 14:17:17.559 2503-2715/com.flowrobe.app V/Capacitor: callback: 119405114, pluginId: Network, methodName: addListener, methodData: {"eventName":"networkStatusChange"}
2021-01-29 14:17:17.573 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Cordova plugin): callbackId: AppRate577142635, service: AppRate, action: getAppTitle, actionArgs: []
2021-01-29 14:17:17.592 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Cordova plugin): callbackId: AppRate577142636, service: AppRate, action: isNativePromptAvailable, actionArgs: []
2021-01-29 14:17:17.595 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Cordova plugin): callbackId: NativeStorage577142637, service: NativeStorage, action: getItem, actionArgs: ["counter"]
2021-01-29 14:17:17.598 2503-2503/com.flowrobe.app I/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 156716 - Msg: Ionic Native: deviceready event fired after 431 ms
2021-01-29 14:17:17.601 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 119405115, pluginId: App, methodName: addListener
2021-01-29 14:17:17.601 2503-2715/com.flowrobe.app V/Capacitor: callback: 119405115, pluginId: App, methodName: addListener, methodData: {"eventName":"appUrlOpen"}
2021-01-29 14:17:17.609 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 119405116, pluginId: SplashScreen, methodName: hide
2021-01-29 14:17:17.610 2503-2715/com.flowrobe.app V/Capacitor: callback: 119405116, pluginId: SplashScreen, methodName: hide, methodData: {}
2021-01-29 14:17:17.622 2503-2715/com.flowrobe.app V/Capacitor/Plugin: To native (Cordova plugin): callbackId: AppRate577142638, service: AppRate, action: getAppVersion, actionArgs: []
2021-01-29 14:17:17.678 2503-2849/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/svg/close-sharp.svg
2021-01-29 14:17:17.686 2503-2575/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/swipe-back-2154c9a7-js-es2015.js
2021-01-29 14:17:17.713 2503-2575/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/5-es2015.js
2021-01-29 14:17:17.718 2503-2578/com.flowrobe.app D/Capacitor: Handling local request: http://localhost/28-es2015.js`
The text was updated successfully, but these errors were encountered: