clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Online check breaks clasp commands due to bug in got

Open kenkku opened this issue 3 years ago • 0 comments

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

  • Node version (node -v): v14.19.0 (also tried with 16)
  • Version (clasp -v): 2.4.1
  • OS (Mac/Linux/Windows): Mac

kenkku avatar Feb 15 '22 15:02 kenkku