1

I have currently a simple Hello World Google App Script following Google Documentation

Google App Script

I published it, giving access to anyone on the internet (including anonymous users) and then get both a xxx/dev and xxx/exec urls (latter for "published versions" usage, latter for work in progress usage).

Publishing google app script

None of those URL are currently working when I call it in my Browser (or through a cURL command) :

Browser error

Any idea on what could go wrong ?

Note : I already published some Google App Scripts in the past and they are still working today. It is as if my "new" google app scripts was not getting published.

2
  • you are using doGET you need to pass parameters in the URL like "?username=jsmith&age=21" , did you tried that ? Commented Feb 1, 2018 at 17:24
  • Nope, query parameters are not mandatory in google app scripts, and request object doesn't contain "only" query parameters. Was related to a bad generated URL when using multiple accounts. Commented Feb 2, 2018 at 6:56

1 Answer 1

3

This could be because you are logged into multiple Google accounts. Try:

  • deleting the "u/0" from the URL
  • signing out of all of your Google accounts, and back into just one
  • trying the /exec in an "incognito" window
Sign up to request clarification or add additional context in comments.

5 Comments

Yes, you were right about the "u/0/", once I removed it, it worked .. seems like there is sort of a bug on suggested URL by google here. Also, note that opening the suggested url (with "u/0/") in incognito tab didn't make it work either (obvious : I had no "indexed connected user" in incognito). Didn't had to sign out from all my accounts, just had to apply your first point and it was OK. Thanks ! :-)
Yeah, it is a bit strange that Google would corrupt their own URL. It could be worth going through the issue tracker to see if this is logged. I'll admit I didn't work this one out, but I can't find the original post that mentions this.
My issue is similar to this. The /exec link from the script editor doesn't contain /u/0 but when I try to use the exec url on the Chrome browser with multiple accounts logged in, it adds /u/1 to the link and therefore breaks it. Is there anyway known way to prevent this?
Thanks for the incognito trick - something changed recently with the web-app URL stuff, and only incognito seems to be working for me at the moment

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.