My app only crashes when changing settings with Connect IQ mobile. If settings are changed using Garmin Express with PC everything is ok. How can I troubleshoot this? Any suggestions? Thanks a lot!
My app only crashes when changing settings with Connect IQ mobile. If settings are changed using Garmin Express with PC everything is ok. How can I troubleshoot this? Any suggestions? Thanks a lot!
See the New developer FAQ:
https://forums.garmin.com/developer/connect-iq/w/wiki/4/new-developer-faq#settings-crash
This can be caused of the value isn't the type you expec.
What do you see in garmin/apps/logs/ciq_log.yml? That's the log of the crash.
Why should I still use this workaround?
'In the past...'
This should happen only for settings changed when the bug was.
So, we need clear answer, has it already fixed or not?
Maybe Brandon.ConnectIQ knows answer.
Error: Unhandled Exception
Time: 2023-01-30T20:25:57Z
Part-Number: 006-B3907-00
Firmware-Version: '11.22'
Language-Code: por
ConnectIQ-Version: 4.1.7
Store-Id: c5fc5ea5-7d12-4fb9-be9c-701663a39db7
Store-Version: 7
Filename: 656046EE
Appname: Meditação
Stack:
- pc: 0x1000b00b
- pc: 0x1000b11f
- pc: 0x1000b725
But when checking application debug.xml file I can't find anything useful
Are you looking in the .iq for the debug file for your sevice? (values there are decimal) Using that the pc values (which are hex) will probably point you to the lines in your code See https://forums.garmin.com/developer/connect-iq/f/discussion/231129/so-you-have-a-ciq_log-file-but-all-you-see-is-pc-without-a-friendly-stack-trace---what-to-do
I will be trying a new code and check if it will work
function readKeyString(myApp, key) {
you use deprecated getProperty maybe device hasn't already support it
I use Application.Properties.getValue()/setValue() on any devices that has it, as I've seen some odd crashes with getProperty()/setProperty()
Didn't work, not sure what is going on. No issues with Garmin Connect, only Connect IQ mobile.
When you decode the pc values, where is it in your code?
I'd switch to getValue()/setValue() if you can. It's some older devices that don't have it, and a simple "has" can tell you if it needs getProperty() instead
Use a try/catch with getValue(), as you'll get an exception for a unknown key.
Please check the settings file when saved with Garmin Express and with Garmin Connect IQ. This is why the application is breaking:
https://drive.google.com/drive/folders/1Q6XDvJ0TwVvrw4AzEGLptMsJx1LQpAW4?usp=share_link
Only the setting activityName is configurable in the application.