google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.53k stars 423 forks source link

Online check breaks clasp commands due to bug in got #909

Closed kenkku closed 2 years ago

kenkku commented 2 years ago

Got, which is used in clasp through is-reachable, has an unresolved bug that causes an error in some circumstances. sindresorhus/got#1489

Expected Behavior

Commands succeed with exit code 0 when there is no errors

Actual Behavior

?master ~/github/[removed]> npx clasp status
Not ignored files:
└─ src/appsscript.json
└─ src/Code.ts

Ignored files:

Error: The `onCancel` handler was attached after the promise settled.
    at onCancel (/Users/kenkku/github/[removed]/node_modules/p-cancelable/index.js:48:12)
    at makeRequest (/Users/kenkku/github/[removed]/node_modules/got/dist/source/as-promise/index.js:38:13)
    at Request.<anonymous> (/Users/kenkku/github/[removed]/node_modules/got/dist/source/as-promise/index.js:143:17)
    at Object.onceWrapper (events.js:520:26)
    at Request.emit (events.js:400:28)
    at Timeout.retry (/Users/kenkku/github/[removed]/node_modules/got/dist/source/core/index.js:1270:30)
    at Timeout.retry (/Users/kenkku/github/[removed]/node_modules/wtfnode/index.js:197:27)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
exit 1

Steps to Reproduce the Problem

I don't know what the steps to reproduce are, as the underlying bug seems to be a race condition. I have reproduced it on two different Macs, but it did not happen on a colleague's Mac

Specifications