clasp: Avoiding Ctrl+c exits to every call
Expected Behavior
Running any call (e.g. clasp push) should push to the server, then exit, returning to the normal terminal prompt.
Actual Behavior
Running any call (e.g. clasp push) pushes correctly to the server, but the terminal remains unresolved, or unclosed properly. It is responsive, but will not return to the normal terminal prompt without forcefully exiting with Ctrl+c.
Steps to Reproduce the Problem
clasp push- Hangs until Ctrl-c input
Specifications
- Node version (
node -v): 14.9.0 - Version (
clasp -v): 2.3.0 - OS (Mac/Linux/Windows): Linux Ubuntu 18.04.4
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 79
Commits related to this issue
- fix: exit the process after the command action is performed. Closes #805 — committed to nilp0inter/clasp by nilp0inter 3 years ago
- fix: exit the process after the command action is performed. Closes #805 — committed to nilp0inter/clasp by nilp0inter 3 years ago
Fixed in https://github.com/google/clasp/releases/tag/v2.3.1
Removing all kind of is-online testing would go against the philosophy of original Google designers. Thus I will not rush taking such a route.
You should get version 2.9.0 with
-Wand-Xoptions.I’ll try to put up a release which address the
is-onlinepackage issue asap.@PopGoesTheWza To further confirm that
public-ip/is-onlineis causing the issue I removed the call toisOnline()in here:https://github.com/google/clasp/blob/4464f73465dd9697ae22fab81c42370ca98232c6/src/utils.ts#L172
and replaced it with
true. The issue disappeared immediately.In the documentation https://github.com/sindresorhus/is-online#how-it-works they mention that
is-onlinetries to determine if the machine is connected to the internet by performing several checks in parallel and it returnstruewhen the first of them returnstrue.My guess is that the check performed via
captive.apple.comsucceeds on my network (given that it uses the proper local DNS) and the others (OpenDNS and myaddr.google.com) are not. The promiseisOnline()returns, makingclaspprogress, but the remaining inner promises are not cancelled and keep dangling until the number of retries/timeout occurs 60/70 seconds later.@nilp0inter Your output is nearly identical to mine… (macos big sur, immediate exit)
@imthenachoman @nilp0inter you can try https://www.npmjs.com/package/forked-clasp/v/2.8.0
it has the option
-Wor--whywhich will log what is still running upon exit.i.e.
clasp version --whyI hear ya. I love how much you can do with it but it has so many one off issues that prevent it from being a full fledged solution platform. I wish Google invested more time/resources on it. Either way, I just wanted to let the devs of
claspknow there are numerous other folks raising this particular issue.