Web App URL changes when I open it thru Chrome

63 views
Skip to first unread message

Marc MENDEZ

unread,
Oct 30, 2021, 8:09:12 AM10/30/21
to Google Apps Script Community
Hi,

Let's sum up my project.

I publish a PDF document which is stored on my Google Drive.
To download it, readers have a web link to my web app. The web app uses a ID parameter to identify the document to display.

The URL is like that :


If I type this URL in Google, it becomes :

https://script.google.com/macros/u/2/s/webAPP_ID/exec?id=DocID
and it fails
Even if I modify manually the URL in the address field, Chrome adds "/u/2" in the URL

If I type https://script.google.com/macros/s/webAPP_ID/exec?id=DocID In Explorer for instance, it works !

Why ?

Thank fot your help

Brett Grear

unread,
Oct 31, 2021, 6:49:12 AM10/31/21
to Google Apps Script Community
This is a known issue and unfortunately there is no fix. Google says it's working on one but it's been at least a few years.
It's caused by having multiple Google accounts logged in. If you use incognito mode or have only one asking logged in it will work fine.  

Unfortunately, this doesn't help your users as there is no way to notify them in app. The only way would be to embed the webapp in a Google Site with the warning but this might not be possible if you use parameters.

Marc MENDEZ

unread,
Oct 31, 2021, 10:22:29 AM10/31/21
to Google Apps Script Community
Hi,

Thank you for your answer. This bug drives me crazy. 
I agree with you : it will not be easy to help my users. The only one soluton I can imagine it's to ask them to open a private session and to copy the URL in.

dimud...@gmail.com

unread,
Oct 31, 2021, 11:04:55 AM10/31/21
to Google Apps Script Community
Creating multiple Chrome profiles is another solution to this issue. But your users will have to be using the Chrome browser to begin with.

Creating multiple profiles is a function of the Chrome browser itself and it allows users to switch between profiles at will without any login issues as long as each profile is bound to a single Google account. 

Your users will need to abandon the practice of logging into multiple accounts (under the default profile) and create individual profiles for each of their accounts and switch between profiles instead. It may seem like a lot to ask of your users, but the practice will actually be of benefit to them since its applicable to all Google logins.

See:
Message has been deleted

Marc MENDEZ

unread,
Oct 31, 2021, 11:55:51 AM10/31/21
to google-apps-sc...@googlegroups.com
Hi

I understand your solution. 
But I use a Web app to check if the user is allowed to download it. At the same time I count the number of download by user.

Le dim. 31 oct. 2021 à 16:17, Don Yerks, Jr. <dyer...@gmail.com> a écrit :
Hi Marc,

This is not an app suggestion ...

It might be the solution (workaround) to your problem ...

PDF Link
Share a direct download of a PDF version of your document
→ Google Docs & Sheets: Replace /edit with /export?format=pdf
→ Google Slides & Drawings: Replace /edit with /export/pdf
Example ... https://docs.google.com/drawings/d/1fvtnOG9iJRjtyKHxKeD2alssU635mhGHYqwzYITszys/export/pdf

Have the web browser download a PDF version of your document with a PDF link. Instead of displaying the document in Google's viewer or app, a PDF is automatically downloaded when the link is clicked.

Link to details ...
Good Luck,
Don Yerks

Don Yerks
Ocean Grove Tennis Center, Chelsea System Administrator / Communications Coordinator
cloudHQPowered by
cloudHQ

--
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/5f3857d3-8323-406d-9dc6-22a1af4affe0n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/0G96c_0SwDA/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAAYs56sU-u6O71pt0nV2fNZUpGJXiQrDbq1n3j9L7fg5sM0zeg%40mail.gmail.com.
Message has been deleted

Marc MENDEZ

unread,
Oct 31, 2021, 12:05:04 PM10/31/21
to google-apps-sc...@googlegroups.com
I use the functionality in fact. And that's why I had the same problem without finding the reason up to the moment I noticed the URL changed.
It's difficult to ask users to abandon this way. Most of them are not keen on computers. Their objective is just to download my file, and I, to track it.
Now I have the explanation,  I will be more accurate in the download instructions. But I don't want to complexify the process. My advice will be to open a private session.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/0G96c_0SwDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.

Marc MENDEZ

unread,
Oct 31, 2021, 12:06:04 PM10/31/21
to google-apps-sc...@googlegroups.com
Thank a lot for your adivices anyway

Le dim. 31 oct. 2021 à 16:59, Don Yerks, Jr. <dyer...@gmail.com> a écrit :
Hi Marc,

I get it ...

Good Luck with your solution.

Don


Don Yerks
Ocean Grove Tennis Center, Chelsea System Administrator / Communications Coordinator
cloudHQPowered by
cloudHQ

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/0G96c_0SwDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages