The library currently doesn't work on Node 8 because some of the APIs only
exist on Node 9 and have not yet been backported. See
https://github.com/nodejs/node/issues/18068 for more information.

On Fri, Apr 6, 2018 at 7:36 AM Patrick Chugh <[email protected]> wrote:

> I am afraid no error message was shown so I had to use a process of
> elimination to figure it out.
>
> Michael and the rest of the team: Do you have any advice on how I can get
> this pure JS version of grpc running on nodeJS version on v8.6.0? I am
> restricted for my current project with this version.
>
> Version 8.6 supports http2 experimentally with the --expose-http2 command
> line argument. However, I cannot get the library to work. Any help or
> workarounds you can offer? What features of 9.x or above does it require
> specifically?
>
> Thanks in advance!
>
>
> On 6/4/2018 3:37 PM, Michael Lumish wrote:
>
> It surprises me that that would be the problem, because the default
> deadline is supposed to be infinitely far in the future. If it really is
> timing out quickly, then that is a bug. Did you see any output that
> indicated what the problem was?
>
> On Fri, Apr 6, 2018 at 12:12 AM Patrick Chugh <[email protected]> wrote:
>
>> Thanks for the speedy response Michael - I figured out the problem myself
>> in the end!
>>
>> The issue was that when making a call to a remote GRPC server the request
>> times out too quickly.
>>
>> In fact, even when I call a local server about 1/10 times my request
>> fails because the server couldn't respond in time. After adding in a 5
>> second DEADLINE object to the calling command it finally worked.
>>
>> May I suggest increasing the default timeout of your GRPC routine? Thanks!
>>
>>
>>
>> On 6/4/2018 3:09 PM, Michael Lumish wrote:
>>
>> Copying the mailing list.
>>
>> On Thu, Apr 5, 2018 at 11:34 PM Patrick Chugh <[email protected]>
>> wrote:
>>
>>> Hello Michael,
>>>
>>>
>>> Sorry to trouble you again, can you please help me by checking the code
>>> below? It works fine under the native C++ wrapper but when I switch to the
>>> new pure JS version the final call back never fires. Any help / direction
>>> would be greatly appreciated.
>>>
>>>
>>> process.env.GRPC_SSL_CIPHER_SUITES='ECDHE-ECDSA-AES128-GCM-SHA256'
>>> // Old Way: var grpc = require('grpc');
>>> var grpc= require('@grpc/grpc-js');
>>> var fs = require("fs");
>>> var protoLoader = require("./proto-loader.js");
>>> var lndCert = fs.readFileSync(
>>> "/Users/patrickchugh/Dropbox/Dev/nodejs/tls.cert");
>>> var macfile = fs.readFileSync(
>>> "/Users/patrickchugh/Dropbox/Dev/nodejs/admin.macaroon");
>>> var macaroon = macfile.toString('hex');
>>> let metadata = new grpc.Metadata();
>>> metadata.add('macaroon', macaroon);
>>> let macaroonCreds = grpc.credentials.createFromMetadataGenerator((params
>>> , callback) =>
>>> callback(null, metadata)
>>> );
>>> //Combine SSL + macaroon metadata in the headers
>>> var sslCreds = grpc.credentials.createSsl(lndCert);
>>> var credentials = grpc.credentials.combineChannelCredentials(sslCreds,
>>> macaroonCreds);
>>> // Old Way: var lnrpcDescriptor = grpc.load('rpc.proto');
>>> var packageDefinition = protoLoader.loadSync('rpc.proto', []);
>>> var lnrpcDescriptor = grpc.loadPackageDefinition(packageDefinition);
>>> var lnrpc = lnrpcDescriptor.lnrpc;
>>> var lightning = new lnrpc.Lightning('34.232.232.166:10009', credentials
>>> );
>>> lightning.getInfo({}, function(err, response) {
>>> console.log('GetInfo:', response);
>>> });
>>>
>>> --
>>>
>>> With Gratitude,
>>> Patrick Chughhttp://www.patrickchugh.com
>>>
>>> 8/F, Unit A, Cambridge House, Taikoo Place,979 King's Road 
>>> <https://maps.google.com/?q=979+King%27s+Road&entry=gmail&source=g>, Island 
>>> East,
>>> Quarry Bay, Hong Kong.
>>>
>>> Tel: 852.2293.2478
>>> Fax: 852.3020.1834
>>>
>>>
>>>
>> --
>>
>> With Gratitude,
>> Patrick Chughhttp://www.patrickchugh.com
>>
>> 8/F, Unit A, Cambridge House, Taikoo Place,979 King's Road 
>> <https://maps.google.com/?q=979+King%27s+Road&entry=gmail&source=g>, Island 
>> East,
>> Quarry Bay, Hong Kong.
>>
>> Tel: 852.2293.2478
>> Fax: 852.3020.1834
>>
>>
>>
> --
>
> With Gratitude,
> Patrick Chughhttp://www.patrickchugh.com
>
> 8/F, Unit A, Cambridge House, Taikoo Place,979 King's Road 
> <https://maps.google.com/?q=979+King's+Road&entry=gmail&source=g>, Island 
> East,
> Quarry Bay, Hong Kong.
>
> Tel: 852.2293.2478
> Fax: 852.3020.1834
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAO8e_2J-MSFpYNJJe5NN4M0b0qDSGriFNObt55DumwTcm%3DqrVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to