steelbrain / steelbrain/node-ssh
UnhandledPromiseRejectionWarning
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Hello !
First of all I want to tell you that I love your module!
Here is the mistake I come across:
(node:20550) UnhandledPromiseRejectionWarning: Error: (SSH) Channel open failure: open failed
at SSH2Stream.onFailure (/usr/src/app/node_modules/ssh2/lib/client.js:1205:13)
at Object.onceWrapper (events.js:421:26)
at SSH2Stream.emit (events.js:314:20)
at SSH2Stream.EventEmitter.emit (domain.js:486:12)
at parsePacket (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:3455:10)
at SSH2Stream._transform (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:701:13)
at SSH2Stream.Transform._read (_stream_transform.js:205:10)
at SSH2Stream._read (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:253:15)
at SSH2Stream.Transform._write (_stream_transform.js:193:12)
at writeOrBuffer (_stream_writable.js:352:12)
(node:20550) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 12)
I run an SSH command in a for loop in an asynchronous function and I don’t understand why I always have this error
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by reproducing the asynchronous SSH command loop described in the report, then inspect the stack frames in node_modules/ssh2/lib/client.js and node_modules/ssh2-streams/lib/ssh.js. Done means identifying the rejected operation and documenting or correcting how the caller handles that rejection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100