Skip to content

Conversation

@sdissegna-maystreet
Copy link
Contributor

This PR fixes #131407

When a service worker is started, the creator sends a message to verify its version. Sometimes this message was being sent to an older, already existing service worker. As a result, the workerReady promise would never resolve and the webview would stay in a loading state.

The best way I found to test this was to load a jupyter notebook ("Jupyter: Create New Blank Notebook) in a browser environment (I used https://github.com/cdr/code-server for that) in Firefox. It happens in Chrome too (~10% of the time), but it's more common in Firefox (~50% of the time).

make sure to post the 'version' message to the
newly created service worker instead of an old one.
@ghost
Copy link

ghost commented Aug 23, 2021

CLA assistant check
All CLA requirements met.

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 24, 2021

Thanks for looking into this!

sdissegna-maystreet added a commit to sdissegna-maystreet/code-server that referenced this pull request Aug 25, 2021
jsjoeio added a commit to coder/code-server that referenced this pull request Aug 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webview in plugins can fail to start sometimes

3 participants