-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clasp push does not update remote code #507
Comments
What I believe is the app script's site is not responsive some times(even after refresh) though internally its already updated. My trick is to only leave appscript.json open in the remote site (View -> Show Manifest File). Then use use |
@klevenick It would be useful if you gave me steps in which I can follow to see this problem. This sounds like a pretty critical problem, so I'd expect more people to run into it. Can you add more details? |
The steps I used to recreate above are pretty much most of it. I tested it from a new project, creating it through clasp and just adding a single line to the Code.js:
If I make changes locally and push, it takes two attempts for it to be updated on the apps script site's code. @Cerlancism has the trick above that seemed to work, but I wasn't able to produce reliable results, sometimes it seemed like the code reverted after publishing it. It definitely seems like it only started in the last month, and yeah, I'm not sure why there aren't more reports. I thought it might have been something with my larger project until I started a clean one to test. |
OK. Maybe it's an issue with |
I've seen it on my account and had the exact symptoms described by @klevenick . I had a large project and starting in mid/late December, I pushed updates and the code wouldn't show as updated on the remote side.
I've done the same thing as @klevenick to create this on a new project. Updated to clasp 2.0.1 Also tried to eliminate browser issue, thinking it might be UBlock or a privacy setting I have in Chrome. Disabled - no change. Tried the vanilla Microsoft Edge client - same issues seeing the updated files. Also tried to eliminate settings with my Google account. This seems to be some issue with getting the Script Editor to load / reload the code from the updated project. |
This has been recently reported in the App Script issue tracker: |
I've been able to reproduce this behavior and have alerted the internal engineering team. I'm fairly certain that the problem lies in how the Apps Script API interacts with the script editor, so follow that issue tracker for updates. |
Official Google™ solution: alias |
Does that actually work? |
running ' |
Er, I thought it was a workaround. It doesn't - running push twice still doesn't help. |
@erickoledadevrel Any update on this issue, is the fix expected to come soon ? |
@erickoledadevrel just tried using clasp but I am unable to push any changes. Is there any update on this issue? It seems like a very serious issue if people can not push changed code? |
I also just tried with no success :( |
For me clasp was working for a few deployments, then it stopped pushing the changes. When I reload the online editor, it still has the old code, If i pull the code back, I am pulling back the old code to the local project. :( |
In my case I copied the code from the Code editor (visual studio code) and pasted it into the google code editor, and then I realised there was an error on the .js . For that error I could not save the changes on google editor. So I just corrected the mistake and I could save it. That was the reason when running 'clasp push' that seems to push it well, but didn't make the changes. It just could't be saved on google just for a mistake in the code. |
Hello there! I had the same problem. I figured out this was because I had an opened tab in my browser pointing to my Apps Script project. If you also have such a tab, try closing it and pushing the code again. Hope this helps. |
I think for me I found the issue after using trying clasp version "YOUR_VERSION_STRING". I got a console message to enable API access. Once I enabled that I was able to make pushes. It's funny because I was able to clone and pull just fine. So this is the Settings URL and then make sure that "Google Apps Script API Access" is on. |
worked for me. thanks |
I had the same problem and I tried all suggestions here, but no success. So I changed the main file extension to ".gs" and clasp push worked. |
I had the same problem... |
One thing I would advise is to look at the error message you got from your CLI. That can help diagnose the problem. Before you push files you must have logged in using To see the changes you must refresh the page of your App Script code. |
As @jiro2017 said, I would make sure you aren't getting any error messages in your CLI. I thought clasp push was not working because my remote editor was not updating (even though the files appeared to have been pushed successfully on my terminal). But when I scrolled up, I saw that I had a syntax error. |
Hi there I'm quite ashamed to spend a bit of time on it, but @davidpedrero and @jiro2017 comments here helped me: there was only an issue with access as "User has not enabled the Apps Script API". Toggling it as recommended at error message worked like a charm. But nonetheless, I'd like to say that failing |
Expected Behavior
Making a change to the code and pushing it remote, it should update after a push
Actual Behavior
Pushing once does not reflect updated code, it needs a second push to be seen.
Steps to Reproduce the Problem
Specifications
node -v
): 11.6.0clasp -v
): 2.0.1The text was updated successfully, but these errors were encountered: