forbeslindesay / sync-rpc Goto Github PK
View Code? Open in Web Editor NEWRun asynchronous commands synchronously by putting them in a separate process
License: MIT License
Run asynchronous commands synchronously by putting them in a separate process
License: MIT License
So I get an error pointing me to this part of the code:
function httpGet(url){
var response = request(
'GET',
url, (err, res, body) => {
if(err)
{
return console.dir(err);
}
});
return response.body;
}
The error says this:
C:\Users\CP\Desktop\BitBot\node_modules\sync-rpc\lib\index.js:130
throw new Error(
^
Error: nodeNC failed:
events.js:183
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onread (net.js:622:25)
at sendMessage (C:\Users\CP\Desktop\BitBot\node_modules\sync-rpc\lib\index.js:130:13)
at C:\Users\CP\Desktop\BitBot\node_modules\sync-rpc\lib\index.js:159:25
at request (C:\Users\CP\Desktop\BitBot\node_modules\sync-request\lib\index.js:28:15)
at httpGet (C:\Users\CP\Desktop\BitBot\test.js:229:27)
at GetPrice (C:\Users\CP\Desktop\BitBot\test.js:197:25)
at Request.get [as _callback] (C:\Users\CP\Desktop\BitBot\test.js:178:21)
at Request.self.callback (C:\Users\CP\Desktop\BitBot\node_modules\request\request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (C:\Users\CP\Desktop\BitBot\node_modules\request\request.js:1161:10)
We are using sync-request
in a VsCode extension (Electron executable), and there seems to be some issues with running multiple Electron processes at the same time. We would like the ability to set the executable running sync-rpc
server, so that we can run this in node
even when the process executable is Electron
.
This is the error we are seeing:
find port exited with code 1
with no stderr
or stdout
.
FYI, I know you don't support Node 6.9.4 or anything before 8 (looking at your travis.yml) but wanted to document this anyway since we went on a bit of a goose chase this morning at work - upgrading from v1.3.4 to v1.3.6 broke our pm2 processes because pm2 started infinite workers that became orphaned even when we used pm2 stop all
and pm2 delete all
.
We confirmed that this was the issue by pinning our (previously unpinned) dependency to v1.3.4 of sync-rpc, and resolved by adding that to our package/package-lock.json. (We're also upgrading our versions of node and npm so this shouldn't be an issue moving forward, but I just wanted to note in case this helps anyone else who notices sudden failures.)
π¨ You need to enable Continuous Integration on all branches of this repository. π¨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you donβt want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Error: nodeNC failed:\n\nevents.js:167
throw er; // Unhandled 'error' event
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
at sendMessage (D:\root\node_modules\sync-rpc\lib\index.js:130:13)
at D:\root\node_modules\sync-rpc\lib\index.js:159:25
at request (D:\root\node_modules\sync-request\lib\index.js:28:15)
at FuncLib.func_server (D:\root\funclib.js:529:26)
at FuncLib.export_wrap (D:\root\funclib.js:547:31)
at FuncLib.GetPowerPlanGuidByName (D:\root\funclib.js:484:58)
at Object.module.exports.template.Case.step [as step_func] (D:\root\case_scripts\test app\test case 01\main.js:16:39)
at Case.run (D:\root\template.js:183:35)
at Object. (d:\root\run_script.js:4:10)
at Module._compile (internal/modules/cjs/loader.js:685:14
Getting the below error,
_node_modules/sync-rpc/lib/index.js:80
throw new Error(
^
Error: Timed out waiting for sync-rpc server to start (it should respond with "pong" when sent "ping"):
[eval]:1
var c=require('net').connect(59542,'127.0.0.1',()=>{c.end("ping\r\n").pipe(process.stdout)});
^
TypeError: Cannot read property 'pipe' of undefined
at Socket.require.connect ([eval]:1:70)
at Socket.g (events.js:286:16)
at emitNone (events.js:86:13)
at Socket.emit (events.js:185:7)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1067:10)
at waitForAlive (node_modules/sync-rpc/lib/index.js:80:11)
at start (node_modules/sync-rpc/lib/index.js:40:3)
at sendMessage (node_modules/sync-rpc/lib/index.js:109:17)
at createClient (node_modules/sync-rpc/lib/index.js:149:27)
at Object.<anonymous> (node_modules/sync-request/lib/index.js:16:14)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)_
Seems it occured, that library considered for only 1 requirement:
Line 23 in 87032e5
Hi, we are trying to use sync-rpc for an vscode extension, and have some issue with using sync-rpc in electron node in vscode. We have some workaround locally to add support for it to work with vscode. May I ask how can we create a PR for it and try to merge it, as we believe other people working with vscode may have similar issue. Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.