Open data-sync-user opened 1 month ago
➤ Matt Reagan commented:
Note: one method that could help with debugging this is to:
In this flow, each window shows an alert to restore tabs, allowing them to be restored individually. In this flow, the above bug still reproduces (which is interesting) but also means that it may be easier to isolate what exactly is going wrong since the first window can be restored and then the 2nd window examined more closely with all breakpoints enabled etc.
➤ Matt Reagan commented:
This should now be fixed by an update which injects a separate tab data store for each window (rather than using a shared instance in the app container).
Potential bug that needs further investigation. I dug into this for several hours but wasn’t able to actually identify the culprit, even after adding breakpoints and debug code to every load()-related method and delegate callback. The issue appears to be a race of some kind because it does not always repro reliably.
Setup/repro for debugging:
Result: after relaunching, both windows are restored, but sometimes the selected tab in one of the windows will be incorrectly set to the wrong URL (from the opposite window).
Notes
┆Issue is synchronized with this Jira Task