question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NWJS doesn't work properly with GRPC for Node.js

See original GitHub issue

NWJS doesn’t work with GRPC for Node.js, Run it with Node.JS directly just act as normal.

  • State which version are you using Version 0.15.4
  • State which OS version are you running with OS X El Captian
  • Provide a reproducible case if possible Install GRPC node.js module in the project folder. $ npm intall grpc and run the application that using GPRC via nwjs.
  • Error message
    /Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:334
    var call = new grpc.Call(channel, method, deadline, host,
             ^TypeError: Call's fifth argument must be another call, if provided
    at TypeError (native)
    at getCall (/Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:334:14)
    at Client.makeUnaryRequest [as sayHello](/Users/David/Downloads/app.nw/node_modules/grpc/src/node/src/client.js:372:16)
    at chrome-extension://jdgkbifmkkkcgglljmlojibojoafmlhi/test.js:13:8

Here is the source code: Archive.zip

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostoycommented, Jul 13, 2016

GRPC is a native module written in C/C++. Did your rebuild it with node-pre-gyp? If not, please install latest nw-gyp with NPM and rebuild with following command:

cd node_modules/grpc
./node_modules/.bin/node-pre-gyp rebuild --runtime=node-webkit --target=0.15.4 --target_arch=x64

Or you can build grpc at the time of installing it with NPM by using following command:

npm install grpc --build-from-source --runtime=node-webkit --target=0.15.4 --target_arch=x64
0reactions
david9991commented, Nov 2, 2018

@black Sorry I have no computer has Windows installed and no experiences with it. Just follow the ghostoy’s instruction and tell what happened, maybe someone could help. 😉

BTW, as mentioned that gRPC is a native module that needs to be recompiled on each platform and each version upgrade. So NWJS --> WebSocket to gRPC gateway (very easy to be implemented by Go) --> gRPC backend may be a better solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - NW.JS failed to load grpc binary module
P.S. It works prefectly fine if I run node server.js command in cmd and then run the nwjs. I am developing on windows...
Read more >
[Solved]-NW.JS failed to load grpc binary module-node.js
My Approach would be a bit different. First of all you cannot have your node.js application and nwjs in the same folder structure...
Read more >
nwjs/nw.js
Hey, wondering if someone can help me out. We are using the NWJS Desktop Capture api and we want to extract the exeName...
Read more >
Basics tutorial | Node
Use the Node.js gRPC API to write a simple client and server for ... to generate the code needed to work with protocol...
Read more >
A journey from Node to GoLang
If your existing technology is not fulfilling all your needs and you are ... were written in NodeJS for a cloud solution and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found