ForbesLindesay / sync-request

Make synchronous web requests with cross platform support.
MIT License
326 stars 49 forks source link

Error: nativeNC failed #90

Closed yoghi closed 6 years ago

yoghi commented 6 years ago

I have tried that sample code take from wiki :

var request = require('sync-request');
var res = request('GET', 'http://example.com');
console.log(res.getBody());

result:

events.js:137
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at _errnoException (util.js:1003:13)
    at TCP.onread (net.js:623:25)
/Users/stamagnini/Workspace/uniservFrontend/acceptanceTests/node_modules/sync-rpc/lib/index.js:121
      throw new Error(
      ^

Error: nativeNC failed:

    at sendMessage ([..]/node_modules/sync-rpc/lib/index.js:121:13)
    at createClient ([..]/node_modules/sync-rpc/lib/index.js:152:27)
    at Object.<anonymous> ([..]/node_modules/sync-request/lib/index.js:16:14)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)

my node version is v9.5.0 , OS: macosx 10.11.6

ForbesLindesay commented 6 years ago

If you clear any package-lock.json/yarn.lock files and re-install you can see if the latest sync-rpc release (1.3.1) makes a difference. I can't reproduce the issue myself, so there's a limit to what I can do.

yoghi commented 6 years ago

Ok, with sync-rpc 1.3.1 work! Thx.

rvillane commented 5 years ago

I'm using sync-request@6.0.0 that references sync-rpc@1.3.4 in node 10.8.1 and I have experienced this same "Error: nativeNC failed" error twice in the last month. Any ideas ?

ForbesLindesay commented 5 years ago

I remain unable to reproduce the issue across multiple operating systems and devices, so I'll need much more detail if I'm to be of any assistance.

tjrhodes commented 1 year ago

I'm consistently getting this error using sync-mysql, would a reproducible example or 3 help here?