03-30-2021 05:47 - edited 03-31-2021 02:42
03-30-2021 05:47 - edited 03-31-2021 02:42
SDK5/Scrollview
I have different views that I change during the runtime of the app (e.g../resources/index.view, ./resources/index-4.view) with
document.location.replace(viewPath).then(...)
The information which view to use is loaded from the .cbor file.
I get a weird error when I try to switch views the first time I launch the app on the watch.
App: Error: Cannot replace view ./resources/index-2.view, another change in progress.
After launching the app once, this error never comes up again on subsequent launches.
My questions:
- What is this change thats need to be terminated first in order for the view to render properly at initial startup?
- Is there any indicator in the app that tells me that the SDK is ready to load the correct view? So I can wait for it.
Thanks for any help!
Answered! Go to the Best Answer.
04-12-2021 08:54
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-12-2021 08:54
Do you mean the first time you launch the app after installation? We generate a binary optimised version, so it can be a little slower the first launch.
The error is reported when there's a view change operation in progress, started either via document.location.replace or document.location.assign. The engine doesn't send a load event to the app, the view is considered loaded when the promise returned by the previous functions resolves / rejects. So could you be triggering multiple events?
Best Answer04-12-2021 08:54
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-12-2021 08:54
Do you mean the first time you launch the app after installation? We generate a binary optimised version, so it can be a little slower the first launch.
The error is reported when there's a view change operation in progress, started either via document.location.replace or document.location.assign. The engine doesn't send a load event to the app, the view is considered loaded when the promise returned by the previous functions resolves / rejects. So could you be triggering multiple events?
Best Answer