Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App: Error: Cannot replace view another change in progress

ANSWERED

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!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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?

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

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
0 Votes