New Web app deploy broke CORS

283 views
Skip to first unread message

Timothy Hanson

unread,
Dec 13, 2021, 8:17:27 PM12/13/21
to Google Apps Script Community
I have a Web app I have used for years.  It creates an updatable JSON file that is accessed via a URL.

I did a small code update to it and redeployed it as a new Web app but now the CORS is broken and I cannot access the data in a different web aplicaction via the URL

Is there a built-in solution to this?  when deploying the web app in google? (did not see anything)
and nothing in the code that has `COS` in it

Any ideas?

I can post the code for the app if that helps

Thanks for any assistance with this

Ed Sambuco

unread,
Dec 13, 2021, 10:55:52 PM12/13/21
to google-apps-sc...@googlegroups.com
Yes we need ot see application and error messages.
CORS is tricky for cross-domain URL references, which I am assuming is what you have here.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ed256ce3-5c1b-4a3d-90a5-a8833d84bf50n%40googlegroups.com.

Clark Lind

unread,
Dec 14, 2021, 8:22:55 AM12/14/21
to Google Apps Script Community
The new IDE gives every new deployment a new URL; so that may have broke it (?? --just a guess). If you go back to the deployment that was working, and update that one (deploy it again with your updated code), the URL should remain the same and in theory, should continue working properly. This is all speculation, so I apologize if it doesn't fix your problem.

Timothy Hanson

unread,
Dec 14, 2021, 10:21:24 AM12/14/21
to Google Apps Script Community
Yes, that worked.  I did not realize that you could redeploy, I thought you had to make a New deployment.

And when I redeployed I saw that there was a library attached to the project which I think was handling the CORS

Thank to both oy you!

Reply all
Reply to author
Forward
0 new messages