-
Notifications
You must be signed in to change notification settings - Fork 64
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
Upstreaming libp2p broke NodeJS support of the web-client #2301
Comments
Before the change to |
I'm able to pass the first initialization check of the client by mocking global.WorkerGlobalScope = global; However, the client still exits with an error later on, after requesting/receiving ZKPs. On my second run, it actually established consensus and then errored and exited. Unfortunately the error is not very descriptive, even when run in vscode's debugger:
|
It turns out the uncaught error that is thrown and mentioned by @sisou is So this is unrelated to requesting/receiving zkps but rather connections that aren't cleaned up properly. |
I have created a PR in libp2p to fix part of the |
Workaround was merged in #2302. |
General information
Bug report
Expected behavior
NodeJS can run the client in a
worker_thread
, for which I created a special entry point.Actual behavior
The client in a NodeJS worker thread panics with
'to have a window or worker context'
, which is the exact panic added in libp2p/rust-libp2p#4889.Steps to reproduce
Run the NodeJS example in the
web-client/example/node
. Make sure to follow the instructions inweb-client/example/README.md
.Crash log? Screenshots? Videos? Sample project?
Question or Feature Request
Add support for NodeJS Worker Threads to libp2p's websocket-websys transport?
I need to find out how it worked before libp2p was upstreamed in #2047, as it did work before, when I added NodeJS support and the example.
The text was updated successfully, but these errors were encountered: