Learn-to-send-email-via-google-script-html-no-server: Google Scripts publish url is incorrect when signed into multiple google accounts

Created on 27 Sep 2017  路  7Comments  路  Source: dwyl/learn-to-send-email-via-google-script-html-no-server

Hello,
I am unable to submit the form & receiving error Can't submit the form, Receiving "Sorry, unable to open the file at present." I have deployed my latest script version with authentication. what would be the issue. Please help

html

enhancement external-dependency

Most helpful comment

just removing the user part of the URL should work too, e.g. for the OP:

https://script.google.com/macros/s/AKfycbyO4vXIPrq4smOSFpUzyQSuOxvJE9YWqlND6GfyZ3Y2lR-pPMk/exec

we should add this to the tutorial, I suppose. also relevant for some gsuite users:
https://stackoverflow.com/questions/26153872/cant-make-a-google-apps-script-publish-for-anonymous-users

All 7 comments

+1 also experiencing this

Strange... and have you, for sure, set the permission correct for the Google Script? It must be accessible by anyone, even anonymous?

Now that I see the link in your browser, I have an idea. I found out that when you are logged into multiple accounts it uses the /u/# in the URL (/u/1 in your case), and this breaks the access to the URL... not sure why Google does this. They could just remove that when letting you copy. May be a bug on their end. If you have it accessible only from a certain account, then that may make sense, but an anonymous link is accessible by people without a Google account, so that prefix in the URL is not helpful, that is for handling multiple Google accounts. Another option is to log out of all other Google accounts when getting that URL, but I think just changing the URL by removing those characters should find the file accessible (it will error out in the browser since it isn't being passed in data), so long as the permission are set correctly per above.

This is an issue with being signed into multiple accounts, the way I solved it was signing out of all accounts. Signing into the only one you need, and redeploying the google script which will give you a new POST URL.

just removing the user part of the URL should work too, e.g. for the OP:

https://script.google.com/macros/s/AKfycbyO4vXIPrq4smOSFpUzyQSuOxvJE9YWqlND6GfyZ3Y2lR-pPMk/exec

we should add this to the tutorial, I suppose. also relevant for some gsuite users:
https://stackoverflow.com/questions/26153872/cant-make-a-google-apps-script-publish-for-anonymous-users

we should probably escalate the issue to Google to be honest. when you share the URL to anyone even anonymous, it should not include that....

the only issue is: what if you want to run Google Scripts from a different account? not sure how they support that currently...

looks like someone filed this with Google's issue tracker, and it's been marked fixed.

https://issuetracker.google.com/issues/72798634

This is an issue with being signed into multiple accounts, the way I solved it was signing out of all accounts. Signing into the only one you need, and redeploying the google script which will give you a new POST URL.

It works finally. The google forum is useless.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mckennapsean picture mckennapsean  路  4Comments

ryanlao picture ryanlao  路  3Comments

mckennapsean picture mckennapsean  路  4Comments

jchesner picture jchesner  路  3Comments

Brothman picture Brothman  路  3Comments