-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
gRPC 1.1 + electron 1.4.15 = problems #10458
Comments
Are you sure that when you installed gRPC, you got the electron precompiled binaries? Did you set the environment variables specified in the electron documentation? If you do that, you should omit the |
Yes, I'm sure. I set the env variables as described in that link with no luck. Then I ran node-pre-gyp manually in node_modules\grpc like this:
The output I get is:
I wonder what version of electron is that grpc binary compiled for. If I had ran "npm install" without the right env variables, npm would have installed the pure node version of the precompiled binary and electron wouldn't have even loaded the module (require('grpc')) in the first place. Either setting the env variables or running node-pre-gyp manually, it seems I do get a binary for electron but not the right one because require('grpc') works but it crashes after calling a function of my service. And as I said previsouly, the message gets successfully to my c++ grpc server but the response seems to break electron somehow. |
The binary is built against electron 1.4.0. But I wouldn't expect that to be a problem; I'd be surprised if electron has binary incompatibility within a single minor version. Do you have any more details about the crash? It might be worth trying gRPC 1.2. There was at least one electron-related fix that I made since 1.1.0. |
I ran more tests:
Same issue: the module can be loaded using require but it seems to crash when it receives the response. When I say crash I mean that the electron's renderer process dies and the devtools window shows the regular "DevTools was disconnected from the page"
I will update my project to use grpc 1.2.0 and go on working but anyway I think the build issue (gyp adding quotes to the echo warning) should be addressed. |
This does not seem to have recurred in over a year. |
The compiled grpc_node.node installed via node-pre-gyp gets loaded correctly in electron 1.4.15 but it makes my electron crash just after a function call. The client gets loaded correctly and the server get to receive the message but it seems that the client (in electron) crashes when it gets the answer.
So, I tried to build the module 'from sources' using electron-rebuild but it didn't work. After a lot of review of the issue, I realized that the problem is the WINDOWS_BUILD_WARNING project. In my console I get:
gyp adds quotes around the echo command and the win10 console doesn't seem to like it.
The solution I found is to change that action by a rule in binding.gyp which allowed me to build the module correctly.
With the module built locally, my electron app works as expected; no crashes no nothing. So it seems the version hosted here: https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.1.0/electron-v1.4-win32-x64.tar.gz doesn't sympathize with electron 1.4.15.
So it would be nice if you can upload a good version of the module for electorn 1.4**.15** and fix the issue of the quotes in the warning project.
Platform: nodejs + electron
Grpc version: 1.1.0
OS: win10 (14393.969)
The text was updated successfully, but these errors were encountered: