08-22-2020 21:43 - edited 08-22-2020 21:44
08-22-2020 21:43 - edited 08-22-2020 21:44
Answered! Go to the Best Answer.
Best Answer08-22-2020 21:53
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
08-22-2020 21:53
Settings can fail to load if you try to access an uninitialised setting; eg,
JSON.parse(props.settingsStorage.getItem('calendars'))This could try to parse an undefined setting, fail, and result in a white Settings screen.
Even if you try to initialise the calendars setting in companion code, the settings page can sometimes run before the companion code.
Before submitting, test your settings on a fresh install (ie, with no settings previously defined).
I could be way off base here; I only took a quick look.
Best Answer08-22-2020 21:53
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
08-22-2020 21:53
Settings can fail to load if you try to access an uninitialised setting; eg,
JSON.parse(props.settingsStorage.getItem('calendars'))This could try to parse an undefined setting, fail, and result in a white Settings screen.
Even if you try to initialise the calendars setting in companion code, the settings page can sometimes run before the companion code.
Before submitting, test your settings on a fresh install (ie, with no settings previously defined).
I could be way off base here; I only took a quick look.
Best Answer08-22-2020 22:38 - edited 08-22-2020 22:39
08-22-2020 22:38 - edited 08-22-2020 22:39
Ah! That could well be it. I think I assumed (and saw in my test runs) that the companion app ran first, but it could be that `calendars` had not yet been populated. I'll try catching that and see what happens.
Best Answer08-22-2020 22:46
Gold Fitbit Product Experts share support knowledge on the forums and advocate for the betterment of Fitbit products and services. Learn more
08-22-2020 22:46
I think it's actually a race condition. The companion usually runs first, but not always.
Best Answer