gonode.js95% confidence\u2191 6

GRPC - nodejs DNS resolution failed

Full error message
I'm working with a GRPC service hosted with HTTPS and self-signed cert. When I connect using syntax like:

const client = new productService('https://grpc-server-xxx.com:9090',
grpc.credentials.createInsecure())

I am getting the error like this

{ Error: 14 UNAVAILABLE: DNS resolution failed
at Object.exports.createStatusError (C:\grpc\node_modules\grpc\src\common.js:91:15)
at Object.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:1209:28)
at InterceptingListener._callNext (C:\grpc\node_modules\grpc\src\client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (C:\grpc\node_modules\grpc\src\client_interceptors.js:618:8) at callback (C:\grpc\node_modules\grpc\src\client_interceptors.js:847:24)code: 14,metadata: Metadata { _internal_repr: {}, flags: 0 },details: 'DNS resolution failed'

Anyone help me how can I resolve the issue.

Note: 
My OS is Windows 10,
nodejs -- v10.16.0,
GRPC

The gRPC library does not recognize the https:// scheme for addresses, so that target name will cause it to try to resolve the wrong name. You should instead use grpc-server-xxx.com:9090 or dns:grpc-server-xxx.com:9090 or dns:///grpc-server-xxx.com:9090. More detailed information about how gRPC interprets channel target names can be found in this documentation page.

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/1b672bccef5cbb8c1507e8d9647c3c5c2fc4459b90c3750ff11c9ec4d75a12c7
hash \u00b7 1b672bccef5cbb8c1507e8d9647c3c5c2fc4459b90c3750ff11c9ec4d75a12c7
GRPC - nodejs DNS resolution failed — DepScope fix | DepScope