question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

connect(...) promise never rejected with wrong private key

See original GitHub issue

When I try to connect to a server with a wrong private key, if it’s wrong (change a letter in the key), the promise is never resolved nor rejected.

await (new SftpClient()).connect({
        host: configuration.host,
        port: configuration.port,
        username: configuration.username,
        privateKey: configuration.openSshCertificate,
      });

When the private key is correct, every thing is ok.

ssh2@1.11.0 ssh2-sftp-client@9.0.3

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
theophilusxcommented, Sep 4, 2022

Version 9.0.4 pushed to npmjs.com

1reaction
theophilusxcommented, Aug 19, 2022

Have pushed a fix which should address this issue. Now, when the private key cannot be processed, you should get an error stating the private key could not be parsed with some details indicating why not.

Plase test and let me know if it fixes your problem. I will push a new 9.0.4 version next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled promise rejection - key path incomplete
I am using a google action to open on google home, ask for an activation keyphrase if the device has not been registered...
Read more >
JavaScript Promise Tutorial – How to Resolve or Reject ...
You can create a promise using the promise constructor like this: let promise = new Promise(function(resolve, reject) { // Make an ...
Read more >
Incorrect error from invalid private key for signTransaction #1998
Hey guys, I was running into an issue where I was getting an insufficient funds error when trying to sign a transaction.
Read more >
Error handling with promises - The Modern JavaScript Tutorial
In the task an error is thrown form inside the promise and promise is never settled neither with a resolve nor reject. The...
Read more >
Is rejecting a Promise only for error cases?
Good question! There is no hard answer. It depends on what you consider to be exceptional at that specific point of the flow....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found