-
Notifications
You must be signed in to change notification settings - Fork 5k
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
web3 -- web worker environment isn't supported #2211
Comments
This issue got solved in the version 1.0.0-beta.38 which I will release within the next days. |
@nivida fyi -- re. beta41: I'm seeing "window is not defined" when creating a new Web3.providers.WebsocketProvider(...) inside A web worker context. (< beta38 threw much earlier: at "import Web3...", so it's closer to working!) UPDATE: Fix at source would be line 1162 of web3-provider-umd.js (beta41) - just remove "Window." |
same problem with version 1.2.4 |
still broken |
When I've tried The
perhaps doing as it says to register a custom implementation with a EDIT: for those experiencing this issue with the window being undefined, I found a solution here about setting
|
Hi all,
Beta 34 (and/or its dependencies, e.g. any-promise) seems to have dependencies on "window" instead of "self" which prevents it working in a web worker context. I've not yet tested on later betas, but suspect they suffer from the same.
Related: #1774
Related: https://ethereum.stackexchange.com/questions/56405/integrating-web3-from-metamask-in-react
The text was updated successfully, but these errors were encountered: