Search code examples
google-apps-scriptweb-applicationsgoogle-account

Some users get an error and weird URL when trying to access my Google Script. Debug Tips Welcome


I wrote two small Google Scripts that present simple forms to fill in. Most of my user community has no trouble using them. A small minority of users can never open the forms, instead they get "Sorry, unable to open the file at this time" error page for both forms. I can't find any common thread for why only some users fail. I've tested on multiple browsers on multiple machines, even on android devices, it never fails for me.

A couple of things I've noted:

  • when it fails for them the URL is re-written. The proper url starts with https://script.google.com/macros/s/... but for broken users when they paste that in they instead get https://script.google.com/macros/u/3/s/... (notice the "u/3" at the end)
  • There is no execution log created when they try to access the site, so I have no way to debug what's going on.
  • The app is permissioned so "Anyone" can access it, and it runs as my account

Sorry, I realize this problem description is impossibly vague. Any debug suggestions would be extremely welcome. I'm not a regular Google App Script developer, so I'm kinda stumbling in the dark with this one. Thanks in advance.


Solution

  • /u/3 means that the user have signed-in into multiple Google accounts, the number correspond to the zero-based index of the account in the order that the user followed to sign-in, 0 is for the default account, 1 is to de second account, 2 is for the thirds account and so on.

    So, on your test include this use case, a user signed-in into multiple Google accounts.

    NOTE: It's known that the HTML Service do not handle as expected this use case.

    Related