0

I'm an GAS novice, attempting to keep an application afloat during a time of transition, and the following issue began presenting recently. Although the script is pushing a URL (for another published script) into a menu item link ... (see images)

set variable as URL

include in nav item hyperlink

...the URL set via the script is not what is being accessed by some (not all) individuals in the published application. Rather than their link opening a URL beginning with "https://script.google.com/macros/s/AK...", some users being directed to URLs that begin with "https://script.google.com/macros/u/2/s/AK...". (Note the addition of the /u/2) Please see screenshot below.

screenshot of URL linked through published application

Any thoughts on how to identify potential issues is appreciated.

Rubén
  • 34,714
  • 9
  • 70
  • 166

1 Answers1

1

/u/2 (the number could vary) are added by Google on web applications that use Google accounts when the user is signed in a Google account.

The numbers vary when the user have signed in in multiple Google accounts:

  • 0 is for the default account
  • 1 for the second account
  • 2 for the third account, etc.

Regarding potencial issues, there is know issue related to this that usually happens when the client-side code calls a server side function that requires to access a private doc, file, form, slide, spreadsheet.

Related

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • 1
    Thank you Rubén! I will advise users to access via incognito mode rather than signing into a separate account. – K.Rhodie Edwards Sep 03 '20 at 18:05
  • @K.RhodieEdwards If you have few users that might work but if it don't you could add a try.. catch and show a message to ask them that and/or share the spreadsheet with all their accounts. – Rubén Sep 03 '20 at 18:14