-
Notifications
You must be signed in to change notification settings - Fork 654
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
Does not support multiple threads #778
Comments
It looks like this is a relatively new feature; the Node 8 version of that addon documentation does not have that section. Because of this, we can only practically support it if nan supports it and the current nan documentation doesn't mention it. In addition, I suspect that making this change is more complicated in this library than in others. We do have some global state, and we have an unusual amount of interaction with Node internals (mainly libuv). So, I don't think it's a good idea to just use some preprocessor logic to switch between the two initializers. |
Thank you for the info! So this at least requires a nan feature, however, I am not competent enough to open a meaningful ticket there. Looks like a kind of fix is now to use the |
Update: I have filed an issue for nan to support this at nodejs/nan#844. |
Any news on this? Or still waiting on nan? Any work arounds we can do in our end in the meanwhile? |
Still waiting. It looks like there has been no activity on that linked issue, and that is a blocker for fixing that for grpc. In the meantime, |
Not really a direct dependecy. I want to use Hyperledger Fabric Node SDK with workers. They use grpc-node :( Thanks anyway, guess I will figure some other way! :) |
@murgatroid99 I have been running into this issue by using a combination of firebase/firestore and Next.js, see vercel/next.js#7894 (comment) The Next.js build process uses workers to prebuild pages in parallel. Are there any plans to fix this in |
As I have already stated on this issue, fixing this depends on the linked nan issue being fixed, and as you can see, that has not yet happened. You should ask in the firestore repository about using grpc-js instead. |
Affects us as well. |
We can't use |
If the "Bandwidth exhausted" issue you're referring to is #1158, a couple of people have reported that that bug is fixed in Node 13. I'm not sure what "Deadline exceeded" error you're referring to, can you point to a specific GitHub issue? |
For users of Electron and Firestore coming here: The issue for moving @firebase/firestore from grpc to @gprc/js is being tracked here: firebase/firebase-js-sdk#1783. |
Hi, I also had a similar error when trying to use worker threads with Hyperledger Fabric Node SDK client:
Is there a recommended workeround for this issue? |
@kondi did you try to use the new https://www.npmjs.com/package/@grpc/grpc-js instead? |
@Farenheith Not yet. At the time of opening, it was very experimental and not production-ready. |
At this point, the |
Problem description
If I try to use the grpc library in multiple threads, I get
Error: Module did not self-register.
exception.Reproduction steps
Run with
node --experimental-worker
:Environment
Additional context
Related issue in node repo with more info: nodejs/node#21783
Proposed fix: nodejs/node#21783 (comment) (The module has to be context-aware.)
This has been already fixed at least in these projects:
Full stack trace:
The text was updated successfully, but these errors were encountered: