clasp
clasp copied to clipboard
Clasp commands return offline error 90% of the time
Expected Behavior
No error
Actual Behavior
Almost every time I run a clasp command, I receive this error with one or all of the domains listed
drive.google.com ✖
console.developers.google.com ✖
script.google.com ✖
Error: Looks like you are offline.
Once in a while the command manages to work successfully, but sometimes I have to retry the command 10+ times.
Steps to Reproduce the Problem
- run a clasp command, for example
clasp push
orclasp pull
- receive error
Specifications
- Node version (
node -v
): 16.7.0 - Version (
clasp -v
): 2.4.1 - OS (Mac/Linux/Windows): macOS Catalina (10.15.7)
I have same issue too.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
drive.google.com ✖
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
drive.google.com ✖
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
drive.google.com ✖
script.google.com ✖
Error: Looks like you are offline.
^P
% npx clasp push
drive.google.com ✖
script.google.com ✖
Error: Looks like you are offline.
% npx clasp push
...
Pushed 2 files.
# On OSX 11.5.2
% node --version
v16.5.0
% npx clasp --version
2.4.1
I was seeing this same error when using node version 16.7.0.
However, when I switched back to a LTS version, 14.17.5, I stopped having this issue.
I'm not 100% sure, but could this be specific to the Node 16?
I have the same issue when using clasp version 2.4.1. But it works well when downgrading to 2.3.1.
- Node version:
v16.8.0
- OS: Manjaro Linux (21.1.0)
$ clasp -v
2.3.1
$ clasp login
Logging in globally...
🔑 Authorize clasp by visiting this url:
...
Authorization successful.
Default credentials saved to: ~\.clasprc.json ...
Downgrading Node to 14.17.5 worked for me as well.
node v14.17.5 clasp 2.4.1 still does not work for me. :(
node v16.15.0 clasp 2.3.1 worked for me. So, it seems to be a bug in the clasp. Hope it will be fixed in 2.5
I would remove the feature that checks if you're online on not:
https://github.com/google/clasp/blob/e851215b8abe4de282c62c4d61076c85e89a56ba/src/utils.ts#L220-L226
Any news on that? I am experiencing the issue without any alternative 😢
@RealSlimMahdi The combination of node 14.17.5
and clasp 2.4.1
has been working for me.
As for the fix, it seems like we are waiting for this PR to be manually merged: https://github.com/google/clasp/pull/937
@sqrrrl Could you confirm?