04-28-2021 05:32
04-28-2021 05:32
I have an app that was deployed on 02/19/2021 to support the Ionic. The app has been working fine until a few days ago and I'm having a problem trying to figure out what is happening. I'm testing the app on my Ionic Version 27.7.1.6.19, the app is targeting SDK 4.2. When I start the app I get one of the following errors in the log:
out of memory error example
[7:58:07 AM]Sideload successful![HOST]
[7:58:07 AM]App Closed[HOST]
[7:58:07 AM]Loaded and evaluated: file:///android_asset/bootstrap.jscompanion/index.js:184,3
[7:58:07 AM]Device application was launched![HOST]
[7:58:07 AM]Loaded and evaluated: file:///data/user/0/com.fitbit.FitbitMobile/app_companions/edb55f67-2859-44d0-9064-74970226b99a/0x01465669bee79213/companion.js[HOST]
[7:58:07 AM]Companion launched by [launchedOnTracker][HOST]
[7:58:17 AM]App Started:1,1
[7:58:23 AM]Fatal Jerryscript Error: ERR_OUT_OF_MEMORY[HOST]
[7:58:23 AM]App Started[HOST]
[7:58:23 AM]App closed on device, unloading companion in 3 seconds…[HOST]
[7:58:26 AM]Unloading companion…[HOST]
[7:58:28 AM]Companion unloaded
Unresponsive error example
[8:09:58 AM]Sideload successful!
[8:09:58 AM]App Closed [HOST]
[8:09:59 AM]Loaded and evaluated: file:///android_asset/bootstrap.js [HOST]
[8:09:59 AM]Device application was launched! companion/index.js:196,3
[8:09:59 AM]Loaded and evaluated: file:///data/user/0/com.fitbit.FitbitMobile/app_companions/edb55f67-2859-44d0-9064-74970226b99a/0x0c974c81f9e65ce7/companion.js [HOST]
[8:09:59 AM]Companion launched by [launchedOnTracker] [HOST]
[8:10:08 AM]Terminating app: Unresponsive [HOST]
[8:10:08 AM]App Started [HOST]
[8:10:08 AM]App closed on device, unloading companion in 3 seconds… [HOST]
[8:10:09 AM]Launch complete - durations: foregrounding(9948ms), first paint(144ms), total(10094ms). [HOST]
[8:10:11 AM]Unloading companion… [HOST]
[8:10:13 AM]Companion unloaded [HOST]
It seems the companion gets loaded, but the app/index.js never gets loaded. I put a "console.log" at the beginning of app/index.js and it is never displayed in the log. I'm really not sure how to troubleshoot this issue.
thanks
04-30-2021 06:24
04-30-2021 06:24
Have you tried rebooting your watch?
05-03-2021 04:47
05-03-2021 04:47
Yes, I've rebooted the watch. It is actually happening on multiple Ionics. I believe the issue is a slow startup time. I've updated the app's code to try to get a quicker startup time.
05-05-2021 07:29
05-05-2021 07:29
Dan,
The Ionic causes me some headaches too. The synchronization between ionics and phones is not the best. Please note that the Companion stops when the connection is lost and starts again when the connection is re-established. In that scenario the "launchedOnTracker" is still true but actually the app is not launched but was running all the time.
What I do on app.js is send a message to companion.js on load. So the companion.js only performance its startup functions when the message "startup" is received.