-
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 deploy doesn't update the deployed version with Google Apps Script Web App #63
Comments
I think you want to I think I forgot to add it in the "How To..." section. LMK if that works. |
@grant |
@andysumi What are the commands you're using? Use |
@grant
|
@grant @andysumi @onlinelaser True: There is a new version deployed on the Google Apps Scripts |
This may be an issue with the API. I'll have to look further. |
@grant sorry for the delay, finally got back to testing this, and I can also confirm that neither deploy nor deploy followed immediately by a redeploy make the new deployment active 😞 |
When i use: But, when i refresh the web browser (F5) i get an error message "Se necesita autorización para realizar esta acción" (You need authorization to perform this action) in the browser. Also, my previous config was: How to send this two config options with a command, and how to solve my issue with the authorization? |
We have the same problem. |
It doesn't appear that clasp deploy can be used to update a web application, and also can't be used to approve permissions and things like that. This would be a very useful addition. At the moment, the "Deploy as Web Application" is the only step in the development process that requires a desktop browser. |
It looks like the script.google.com UI updates the manifest file ( When you use the UI to deploy a web app, it adds this bit of code to "webapp": {
"access": "MYSELF",
"executeAs": "USER_DEPLOYING"
} This is really important, as it's the configuration details of the web app. So if you are using ReproCreate the project with clasp
{
"timeZone": "America/New_York",
"dependencies": {
},
"webapp": {
"access": "MYSELF",
"executeAs": "USER_DEPLOYING"
},
"exceptionLogging": "STACKDRIVER"
} Setup other web app files
|
Is it possible, and/or a good idea to have some sort of flag for |
I don't think adding more CLI flags to clasp will help.
What we really need is more of the following:
|
@grant can you shade some light on where we are with this issue? I would LOVE to be able to deploy a new web-app version when I push my updates. I dislike having to need to go to the WEB UI to deploy that new version of my web-app. |
@shai If I'm reading this ticket correctly you should be able to do everything without the WEB UI, it's just not super clear because you'll need to manually update your
You need to pick one of the |
@TrojanCoder I've actually got this already:
and when I |
I just tested the steps I wrote above again. Deploying a web app from clasp works. You just need to make sure you update the Steps: #63 (comment) Set up and deploy a web appclasp clone 1kDaDgJUTxkVmr7TkPSqx2wjxMhiY3DH1v_nZfpdkdsPcy2Lfo-09onYz
Cloned 2 files.
└─ appsscript.json
└─ Code.js
vi appsscript.json # add the `access` and `executeAs` fields.
vi index.html # write an HTML skeleton with "hi"
vi Code.js
clasp push
└─ Code.js
└─ appsscript.json
└─ index.html
Pushed 3 files.
clasp deploy
Created version 1.
- AKfycbwP6WvBwvNI3m_d3Ts8bnYBX8y0lG7OQEuV65m2E6t3J44g9Cay8wGZ2JRfQ9mHcpI1 @1. See the page: "hi" Deploy Againvi index.html # write an HTML skeleton with "hi 2"
clasp push
clasp version
clasp deploy 2 Go to the new URL. I haven't tested |
So I've just tested that workflow and it does push the deployment up (which was working originally as well) - but it also doesn't make it active as the published project version. Meaning that you still need to go to the UI and make the project version the one you just deployed :-( |
so I'm unsure about why it's working for some and not others? @grant if you last comment you said and showed that it works, but @onlinelaser and myself say it isn't and then you added the API support needed label which implies it doesn't work? Should I keep trying to get it working or did you verify that it isn't working and we need to wait for a solution? |
I added the |
Any news here? I created an issue #286 about |
I found out the way to update the published web app endpoint by clasp. We should use The function We just need
|
Also note that when you manually deploy as a web app your project (using the "Deploy as web app" menu entry), it automatically generates a new deployment (or update the existing deployment if you update your web app). |
|
FYI: |
The confusion that I ran into was getting the correct deploymentId to use with You need to got to "Publish > Deploy from Manifest" and Get ID of the deployment you want to use. Then use |
how do I deloy programmatically? |
what is difference between deploy and publish? |
hello, what about a google sheets addon, is the deploy option updating a published version? |
I think there is no difference between sheet and doc.clasp deploy will create a new version number and deploymentId,but you must choose the deplomentID and publish manually |
It seems that clasp deploy a new deployment ID when not specified deployment ID with |
I found this trick working for deploy a new version of webapp.
After selecting deploment ID, proceed with
I found that I tried a couple of times and seems to work, you can try and test as well. |
This would have helped me immensely. There seems to be a lot of confusion around redeployments, see google#63 and see the somewhat unrelated google#752 with lots of "unrelated" comments
This would have helped me immensely. There seems to be a lot of confusion around redeployments, see google#752 and see the somewhat unrelated google#63 with lots of "unrelated" comments
Summarizing:
So the process:
So, in the end it looks that |
When I deploy my test_deployment_id and tries to open it on the browser, it redirects to Please check the address and try again. Get stuff done with Google Drive Apps in Google Drive make it easy to create, store and share online documents, spreadsheets, presentations and more. Learn more at drive.google.com/start/apps. |
regarding @sovcik Summarizing
sub-command
|
after doing that step, the browser autoredirects to Sorry, unable to open the file at this time. Would really like to get this working. |
Apparently, when we execute clasp deploy, the command forgets to create an entry point to the webapp. See below: Entry points after deploying from clasp:
Entry points after deploying from the Script Editor:
This is why we get a Drive Error when, after deploy from clasp, we try to enter the /dev page. referenced here: googleapis/google-api-python-client#866 |
I started using Clasp today and can confirm this issue still persists (following same steps) to this day. Any workaround available for this? |
somehow i found the solution for this.
I want to deploy the app with the same deployment ID but a new version. The right way:
|
Expected Behavior
Perhaps I'm misunderstanding, but from the readme I'd thought that
clasp deploy
would allow me to publish a new version of a Web App (in this case bound to a google sheet).I'd expected the workflow to be as follows:
browser opens to newly published version "xx"
Actual Behaviour
The version is created as expected, but the web app Project Version remains at the last deployed version not the version used with
clasp deploy
. To actually deploy it I have to go into the Script Editor then Publish > Deploy as Web App and then select the version "xx"Related Issues
This seems related to #43, however that issue specifically relates to Chrome store apps and this is a Web App which the comments on that issue suggest should be supported.
The text was updated successfully, but these errors were encountered: