Answered! Go to the Best Answer.
Best AnswerSettings 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 AnswerSettings 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 AnswerAh! 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 AnswerI think it's actually a race condition. The companion usually runs first, but not always.
Best Answer