Apps Script webapp started redirecting to 404

1,695 views
Skip to first unread message

Patricio Stegmann

unread,
Sep 14, 2020, 3:53:15 PM9/14/20
to Google Apps Script Community
Hello,

I built an GAS webapp, that works fine. I started seeing yesterday and today that now the published entry point redirects instead of staying on the apps link, and that redirection gets a "not found". This only happens if the user is logged in. It stays on the good page if using an anoymous browser.

The link that I am opening (from my apps entry point) is:


when entered on a logged-in browser, Apps script auto-redirects it to a 404:

https://script.google.com/macros/u/1/s/AKfycbzJPMOyjX02kFAZizcDUK-iWGp0EAqOjfuhB7xtmsGb3IWebJZV/exec

I wanted to know what is going on and how to fix it asap !!!!!

Thank you !

Andrew Roberts

unread,
Sep 15, 2020, 5:30:50 AM9/15/20
to google-apps-sc...@googlegroups.com
The "/u/1" in the URL reminds me of an outstanding issue with Apps Script and being logged in with multiple users. I couldn't find the specific issue I was thinking of, (using "componentid:191640+ status:open exec URL" just:


where it talks about removing the "/u/1" fixing the issue.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/153323e6-0eef-45c1-9841-10ba2d3e4351o%40googlegroups.com.

Patricio Stegmann

unread,
Sep 16, 2020, 5:01:58 AM9/16/20
to Google Apps Script Community
Thank you for the clues and link ! This is indeed related to having multiple google users on a browser, which is a common pattern. 
I saw the link and the issue is similar but not the same: they state that the URL's generated when publishing do contain those 2 sublevels /u/0 or /u/1 and if they remove them it works. My issue is worse now,  because the publishing creates the correct URL, but when accessing it, the google platform redirects it to a /u/1 404 error and I have nothing to avoid it !
I'm gonna put a more precise title to see if someone reads and remembers anything else !

Jaume Aragay

unread,
Mar 27, 2021, 5:08:21 PM3/27/21
to Google Apps Script Community
If you get the users to log out of all the google accounts and log in FIRST on the one you want them to use with your app you may get lucky as the problem is that, when reloading the page, the web-app reverts to the Primary account, the first one logged in in the browser.

For a web-app I made for a closed group of users I've recommended them to use a different browser (for example Vivialdi, that no une uses in that users' group) and consider it the app itself. To save the app link in the phone screen and use that icon to access it and use that browser only to access the web-app and not logging in any other Google account in that browser until Google solves this bug. It's a patch, but it works for them.

El dia dimecres, 16 de setembre de 2020 a les 11:01:58 UTC+2, kpo...@gmail.com va escriure:

Kim Nilsson

unread,
Mar 28, 2021, 4:24:02 AM3/28/21
to Google Apps Script Community
For any Google Workspace admin, my recommendation is that they actually disallow the ability to login to secondary accounts, period.
The proper way to use more than one Google account is to use them in separate Chrome profiles, and it's better for everyone if that is the way all users are taught how to do it. Chrome profiles work both on mobiles and computers, so nobody loses anything by doing it the proper way.

Set this setting to only your Workspace domain.

And, you as the developer can recommend that in your information wherever you publish your tool.

Adam Morris

unread,
Mar 28, 2021, 10:37:29 AM3/28/21
to google-apps-sc...@googlegroups.com
I’ve been advocating that users use the chrome profiles in the people menu. 

But does that setting mean they can’t log in as another user on mobile Chrome?

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
--

Kim Nilsson

unread,
Mar 28, 2021, 11:47:53 AM3/28/21
to Google Apps Script Community
You can choose to not let any Chrome User Settings affect mobile users, but instead I recommend the same instructions for mobile.

Keep the accounts separate by using Chrome profiles, even on mobile. Almost as easy as on a computer. 

Jason Ng (Darkmwar)

unread,
Feb 28, 2023, 11:01:27 PM2/28/23
to Google Apps Script Community
This issue is still happening today.
Reply all
Reply to author
Forward
0 new messages