Status Update
Comments
mu...@gmail.com <mu...@gmail.com> #2
Also being discussed in Clasp project:
ek...@google.com <ek...@google.com> #3
1) Create a new script using clasp:
$ mkdir test
$ cd test
$ clasp create
2) Locate the script in Drive and open it.
3) Note how the editor shows one file called "Code.gs" with an empty function "myFunction".
4) Add a new local file called "hello.js":
$ echo "function run() { Logger.log('hello world'); }" > hello.js
5) Push the code to Apps Script:
$ clasp push
6) Refresh the script editor.
Expected:
The script editor shows one file called
Actual:
The script editor still shows only Code.gs.
Notes:
- Refreshing the script editor multiple times over the course of minute doesn't resolve the problem.
- Running clasp push a second time does resolve the problem.
- Further changes to an existing file are reflected in the script editor immediately after clasp push.
- Adding or deleting additional files also results in a stale script editor.
- The stale state applies to the new files and changes to existing files.
- The code is actually updated in the backend, as when you run the code it runs the version you pushed, even though you are looking at the stale version in the script editor.
ka...@kobler.no <ka...@kobler.no> #4
aa...@gmail.com <aa...@gmail.com> #5
iv...@gmail.com <iv...@gmail.com> #6
me...@gmail.com <me...@gmail.com> #8
ek...@google.com <ek...@google.com>
an...@workmanforensics.com <an...@workmanforensics.com> #9
Are there any updates on this issue? I just started using clasp and have yet to have it work successfully, so it could be that I'm doing something wrong, but it appears to be this issue.
- I used
clasp create
to create a standalone project - Copied files into the project directory
- Attempted to use
clasp push
- Terminal shows a list of files and "Pushed 56 files." so it appears to have been successful
- When I open the GAS project in my browser, only the default Code.gs is there and the manifest has not been updated
edit: I found that in my case the issue was due to a syntax error in one of the pushed files. If I remove that file from the directory, the push is successful.
jo...@google.com <jo...@google.com> #10
Hi there!
I am currently assessing and researching this issue. If you keep facing the problematic behaviour, write back saying so. If it is possible, please share a script that replicates the issue or the steps required to reproduce it.
mu...@gmail.com <mu...@gmail.com> #11
Several of us have documented the steps in the thread
Essentially it is as first described:
- Make changes to code.js, save
- Run clasp push, confirms push
- Reload script, change is not seen
- Run clasp push, confirms push
- Reload script, change is seen
jo...@google.com <jo...@google.com> #12
Hello!
Thank you for your support. I just forwarded the information to the team in charge for additional analysis.
fa...@gmail.com <fa...@gmail.com> #13
iq...@gmail.com <iq...@gmail.com> #14
ph...@brp.com <ph...@brp.com> #15
I tried everything suggestion above without any success...
Did you find a workaround?
Thank you.
lu...@gmail.com <lu...@gmail.com> #16
Closing the tab and pushing the code again worked for me.
Does it work for you ?
Description
First, please search through existing issues to ensure that the bug has not already been reported. You can start the search here:
If the issue has already been reported, you can click the star next to the issue number to subscribe and receive updates. We prioritize responding to the issues with the most stars. You can also comment on the issue to provide any details of your experience with it.
If your issue has not been reported, please provide all of the following:
-----------------------------------------------------------------------------------------------------------------------------
A short description of the issue:
when I clasp push to an apps script project, it sometimes takes a few tries until the code in the project updates. I have taken to manually updating a version number in a project file so I can verify that the push worked.
A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.
this is an intermittent issue with clasp push
What steps will reproduce the problem?
1. clasp push
this is an intermittent problem that can't be reliably reproduced
What is the expected output? What do you see instead? If you see error messages, please provide them.
expected: latest code in the apps script project
actual: not the latest code in the apps script project
Please provide any additional information below.
I have also noticed a change where clasp will accept code with parse errors in it and then the project will break, whereas previously the parse errors would be rejected at the clasp push stage. These two things may or may not be related.