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.
08-22-2020 21:53
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.
08-22-2020 21:53
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.
08-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.
08-22-2020 22:46
08-22-2020 22:46
I think it's actually a race condition. The companion usually runs first, but not always.