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.

Unhandled Rejection returns exit code 0

See original GitHub issue

Summary

sfdx force:source:push failed with the error

Unhandled rejection Error: connect ETIMEDOUT 161.71.2.159:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14)

yet it still returned exit code 0, indicating success. I expect it to raise an error (return non 0 exit code) so that my CI job would fail on this step and highlight it to me.

Steps To Reproduce:

Unsure, maybe disconnect network during push?

Expected result

Should have returned an exit code != 0 so that command was marked as failed

Actual result

Exit code 0 returned

Additional information

image

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.28.7 linux-x64 node-v12.11.1 SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@oclif/plugin-commands 1.2.3 (core) @oclif/plugin-help 2.2.1 (core) @oclif/plugin-not-found 1.2.3 (core) @oclif/plugin-plugins 1.7.8 (core) @oclif/plugin-update 1.3.9 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.0.5 (core) analytics 1.2.1 (core) generator 1.1.1 (core) salesforcedx 47.1.5 (core) ├─ force-language-services 47.5.0 (core) └─ salesforce-alm 47.4.0 (core)

sfdx-cli 7.28.7 (core)

OS and version: https://github.com/salestrip/docker-sfdx-cli/blob/master/Dockerfile

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
laithalcommented, Nov 19, 2020

I’m seeing the same issue as well

sfdx-cli latest

sfdx force:source:push -f Job ID | 0Af1X000016eKf2SAE

ERROR: Error: connect ETIMEDOUT 85.222.147.31:443 Unhandled rejection Error: connect ETIMEDOUT 85.222.147.31:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

1reaction
trentchilderscommented, Nov 18, 2020

I’m getting this error when trying to build to a scratch org, running sfdx force:source:push Error:

Unhandled rejection Error: connect ETIMEDOUT 136.147.101.223:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.1 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.3 (core)
analytics 1.12.1 (core)
auth 1.3.0 (core)
config 1.1.11 (core)
generator 1.1.3 (core)
salesforcedx 50.5.0 (core)
├─ custom-metadata 1.0.10 (core)
├─ schema 1.0.1 (core)
├─ templates 50.1.0 (core)
├─ salesforce-alm 50.5.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ apex 0.1.2 (core)
sfdx-cli 7.80.0 (core)
Read more comments on GitHub >

github_iconTop Results From Across the Web

reject on return code > 0 #86 - sindresorhus/open - GitHub
This assumes that an exit code of > 0 signals an error and other exit codes (0 or negative) signal success. For one...
Read more >
node.js - Unhandled rejection rangerror: invalid status code: 0
Taking the first function as example, make it a model function, leaving the the controller manage req and res . Have it just...
Read more >
Unhandled Promise Rejections in Node.js - The Code Barbarian
DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.
Read more >
Handling those unhandled promise rejections with JS async ...
You put your code inside an async function in order to use await calls; One of your await ed functions fails (i.e. rejects...
Read more >
Window: unhandledrejection event - Web APIs | MDN
Allowing the unhandledrejection event to bubble will eventually result in an error message being output to the console.
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