Skip to content
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

Google Scripts publish url is incorrect when signed into multiple google accounts #163

Closed
swapnil2sutar opened this issue Sep 27, 2017 · 7 comments

Comments

@swapnil2sutar
Copy link

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

@joelaguero
Copy link

+1 also experiencing this

@mckennapsean
Copy link
Collaborator

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.

@helloarjune
Copy link

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.

@mckennapsean
Copy link
Collaborator

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

@mckennapsean mckennapsean changed the title Can't submit the form, Receiving "Sorry, unable to open the file at present." Google Scripts url is broken when signed into multiple google accounts Jan 21, 2018
@mckennapsean
Copy link
Collaborator

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...

@mckennapsean mckennapsean changed the title Google Scripts url is broken when signed into multiple google accounts Google Scripts publish url is incorrect when signed into multiple google accounts Jun 24, 2018
@mckennapsean
Copy link
Collaborator

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

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

@tintinwong714
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants