K.Rhodie Edwards
K.Rhodie Edwards

Reputation: 3

Why is my script pushing an incorrect URL? [/u/2 inserted into script URL]

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.

Upvotes: 0

Views: 460

Answers (1)

Wicket
Wicket

Reputation: 38130

/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

Upvotes: 1

Related Questions