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.

clasp push -w randomly crashes

See original GitHub issue

Expected Behavior

I would expect clasp push -w to sit indefinitely without crashing and dumping crash information.

Actual Behavior

After random amounts of time —sometimes it happens within minutes after just a couple of pushes and sometimes it will run for hours without issue— clasp will crash and dump information about the cause. Here is an example of the output after the crash:

Error: The `onCancel` handler was attached after the promise settled.
    at onCancel (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/p-cancelable/index.js:48:12)
    at makeRequest (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/got/dist/source/as-promise/index.js:38:13)
    at Request.<anonymous> (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/got/dist/source/as-promise/index.js:143:17)
    at Object.onceWrapper (node:events:646:26)
    at Request.emit (node:events:526:28)
    at Timeout.retry (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/got/dist/source/core/index.js:1270:30)
    at Timeout.retry (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/wtfnode/index.js:197:27)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
node:events:504
      throw er; // Unhandled 'error' event
      ^

RequestError: Timeout awaiting 'request' for 25000ms
    at ClientRequest.<anonymous> (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/got/dist/source/core/index.js:962:65)
    at Object.onceWrapper (node:events:646:26)
    at ClientRequest.emit (node:events:538:35)
    at ClientRequest.origin.emit (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at TLSSocket.socketErrorListener (node:_http_client:442:9)
    at TLSSocket.emit (node:events:526:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at Timeout.timeoutHandler (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/got/dist/source/core/utils/timed-out.js:36:25)
    at Timeout.timeoutHandler [as _onTimeout] (/opt/homebrew/lib/node_modules/@google/clasp/node_modules/wtfnode/index.js:197:27)
    at listOnTimeout (node:internal/timers:561:11)
    at processTimers (node:internal/timers:502:7)
Emitted 'error' event on Request instance at:
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  name: 'TimeoutError',
  code: 'ETIMEDOUT',
  timings: {
    start: 1645892658018,
    socket: 1645892658022,
    lookup: 1645892658023,
    connect: 1645892658064,
    secureConnect: 1645892658088,
    upload: 1645892658088,
    response: 1645892658168,
    end: undefined,
    error: 1645892683027,
    abort: 1645892683026,
    phases: {
      wait: 4,
      dns: 1,
      tcp: 41,
      tls: 24,
      request: 0,
      firstByte: 80,
      download: undefined,
      total: 25009
    }
  },
  event: 'request'
}

Node.js v17.5.0

I’m new to all of this stuff. This is the only project I’ve got, so far. The code is TypeScript and I’m editing it in Visual Studio Code. Pushing the code works great and it runs well up on script.google.com. When clasp is up and watching the project folder, it works very well. It just doesn’t stay up and running (watching).

Steps to Reproduce the Problem

  1. Run clasp push -w in a project folder.
  2. Wait an indeterminant amount of time (seriously, I can’t find a pattern to the amount of time or how many pushes cause this).

Specifications

  • Node version 17.5.0:
  • Version 2.4.1:
  • OS Mac 12.2.1:

This is running on an 2021 M1 MacBook Pro with 64 GB of RAM, for whatever that’s worth.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
killinsuncommented, Apr 23, 2022

Do you still get this issue? I had same and tried downgrade to 2.4.1 -> 2.3.0, It works well for now.

Node version: 16.14.2 OS: Mac 12.3.1 (M1 2020 MBP)

0reactions
eka05commented, Jul 16, 2022

Help me please

PS E:\Clasp Google Script> clasp push

PS E:\Clasp Google Script> clasp push drive.google.com ✖ Error: Looks like you are offline.

No valid E:\Clasp Google Script.clasp.json project file. You may need to create or clone a project first.

No valid E:\Clasp Google Script.clasp.json project file. You may need to create or clone a project first. PS E:\Clasp Google Script> clasp push -w console.cloud.google.com ✖ drive.google.com ✖ Error: Looks like you are offline.

Read more comments on GitHub >

github_iconTop Results From Across the Web

US20030205425A1 - Airbag neutralizing crash rescue system ...
A rescue system protects against air bags as deformed vehicle parts are deflected to free trapped occupants at a crash site.
Read more >
App crashing randomly - Not possible to remove variable
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Not possible to remove variable: 400: <unknown var (bug!) with engine ...
Read more >
nutrient flow in nft trays
Every year they came loose with the spring thaw and drifted at random until the ... leaned forward across the smooth stone to...
Read more >
vanguard log in button not working
Deployment with push button release clasp. Any unsupported browsers that are not stated above will be limited in troubleshooting. Click on the “...
Read more >
Ashton Greymoore | Critical Role Wiki - Fandom
On Ashton's pant leg is a patch with a symbol of the Clasp. ... Jiana walked in on the attempted burglary and used...
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