Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing mode causes "Uncaught " exceptions from Worker #4410

Closed
dimovpetar opened this issue Nov 16, 2020 · 6 comments
Closed

Changing mode causes "Uncaught " exceptions from Worker #4410

dimovpetar opened this issue Nov 16, 2020 · 6 comments

Comments

@dimovpetar
Copy link
Contributor

dimovpetar commented Nov 16, 2020

Hello,

When I try to change the mode several times fast there is error with message "Uncaught " in Chrome.
To reproduce:

  1. Open https://jsfiddle.net/bjfwayhp/
  2. You will see alert showing the error
  3. If there is no error, make sure to clean the browser's cache and try again

This looks like a race condition. When calling setMode(...) the previous mode already triggered network request, which is cancelled.
Is there any way to avoid this, or any possible workaround?

Best regards,
Petar

@github-actions
Copy link

github-actions bot commented May 9, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@dimovpetar
Copy link
Contributor Author

This issue is still relevant

@dimovpetar
Copy link
Contributor Author

dimovpetar commented May 25, 2023

Hello @andrewnester , any update on this? It is labelled with pending-reproduction, but it is straightforward to reproduce it in the linked jsfiddle.

@nightwing
Copy link
Member

Looks like browsers throw error if worker is terminated during importScript.
We can catch all errors thrown by worker after it is terminated to not interfere with error reporting software on the page, would that help you?
Also note that the built-in workers are mostly outdated, a better approach is to use http://github.com/mkslanc/ace-linters.

@dimovpetar
Copy link
Contributor Author

@nightwing yes, that would help.
I will also take a look at the ace-linters, thanks for mentioning that. But until we migrate, It would be good to have the worker error fixed.

@dimovpetar
Copy link
Contributor Author

Fixed with #5182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants