Google appscript web app issue

624 views
Skip to first unread message

Dora Samy

unread,
Sep 2, 2021, 4:27:54 PM9/2/21
to Google Apps Script Community
Hi,
Created web apps and embed it in google site.
error.
The webapp is published for use even anonymous too.
Can anybody let me know what is the issue.
As end users dont have multiple email login accounts , which is usually the cause.
Can somebody let me know why this problem crops up?

Clark Lind

unread,
Sep 3, 2021, 7:39:37 AM9/3/21
to Google Apps Script Community
Here are some initial thoughts that come to mind:

1) Is this on new Sites or Classic sites? I assume new since most people have migrated by now. (Just want to rule out the obvious).
2) Has the script ever worked, and then stopped working, or has it always been this way?
3) Is the Site file or Script file in a shared drive folder? 

Dora Samy

unread,
Sep 3, 2021, 2:36:27 PM9/3/21
to Google Apps Script Community
Hi,
New site.
Yes the script file embed into site is in shared folder.
Is that a problem?
I will always able to open the site and as well as url comfortably. But some of the users say that they have this issue of not found.
All the people who uses the site are shared with the web app google sheets file shared as well as even anonymous is how it is published.

Folder access , file, site are share with the users who are accessing it.
2 users are able to use the url and site comfortably. 2 people are getting error.

Those who dont have access to files and folders are also when they open site link in mobile or from mail- they can view comfortably.
So  it is due to some permission or access- but what exactly is the issue, i am not getting.

And url doesnt have  /u/2 appending also - incase of multi gmail login ..

These are the observation.
Script runs- out of 4 - 2 people it runs and 2 get error.

cbmserv...@gmail.com

unread,
Sep 3, 2021, 3:20:19 PM9/3/21
to google-apps-sc...@googlegroups.com

I think the issue is how the Web app has been deployed.

 

The various settings are:

 

  • Only myself
  • Anyone within your organization
  • Anyone with a Google Account
  • Anyone (even anonymous)

 

If you want anyone to be able to run this webapp regardless of whether they are authorized or not, you should choose the last option.

--
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/6046a9ff-9dce-4ced-a745-2d04a714967bn%40googlegroups.com.

Dora Samy

unread,
Sep 3, 2021, 3:33:31 PM9/3/21
to google-apps-sc...@googlegroups.com
Hi This is the option i chose
Anyone (even anonymous)

It is something related to sharing- as only 2 people gets issue.. general user who are not connected to the web app is able to run
and out of 4 shared people, 2 are able to run.
I am not able to find out what exactly issue at the 2 people end..

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/MISPY9W5R3o/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/003201d7a0f8%24ba4bc3a0%242ee34ae0%24%40gmail.com.

cbmserv...@gmail.com

unread,
Sep 3, 2021, 3:38:09 PM9/3/21
to google-apps-sc...@googlegroups.com

Are you using the new editor or the older script editor to deploy the webapp? The settings are similar but on the new editor you need to specify manage deployments, then edit the deployment to change setting otherwise, it just creates a new deployment with a new URL. So your old deployment is still there but with older settings that you don’t want.

 

Check it and make sure you have deployed it correctly. Because based on the issues you are seeing, it looks like it is not deployed for anyone to access.

Dora Samy

unread,
Sep 3, 2021, 4:13:53 PM9/3/21
to google-apps-sc...@googlegroups.com
Hi,
I am using old legacy editor.
As in new editor, i did not find option to save versions, i moved to old editor and all my web app deployments are in old editor only.
Deployment-
executed as me
Who has access to the app:
-anyone even anonymous.

Clark Lind

unread,
Sep 3, 2021, 4:32:07 PM9/3/21
to google-apps-sc...@googlegroups.com
Are you writing your code as a general user, or are you part of a domain with a plan like Google for Business, School, Government?
Also, out of curiosity, are all the users using gmail.com (or your domain) email addresses?

Dora Samy

unread,
Sep 3, 2021, 4:39:28 PM9/3/21
to google-apps-sc...@googlegroups.com

 i am a general gmail user and one another normal gmail user.
One is different domain dont have gsuite subscription.
And 1 is gsuite enterprise user.
The issue is for both different domain and gsuite user. For both the google sheet and script is shared . I am the owner of the sheet and i had deployed the app.
All others has edit access.


Clark Lind

unread,
Sep 3, 2021, 4:47:42 PM9/3/21
to google-apps-sc...@googlegroups.com
How are you embedding the script in the site page? Are you using the straight forward embed Url Using Embed?  
Have you tried embedding the script as an Iframe? Like this:
<iframe src="your_script_URL"></iframe>   If yes, did you try just embedding the URL? 

Other than that, I don't have any other ideas that might help. If you send them the script URL, does it run for them when Not embedded in the site?

Dora Samy

unread,
Sep 3, 2021, 4:55:37 PM9/3/21
to google-apps-sc...@googlegroups.com
I have not tried iframe, directly i embed it.
I will try iframe. But generally it is necessary only for worpress sites right? even for google site, is it needed?

Clark Lind

unread,
Sep 3, 2021, 5:38:10 PM9/3/21
to google-apps-sc...@googlegroups.com
Some browsers behave differently, so putting it in an Iframe may or may not help. 

Can they run the script straight from the published URL? If yes, then it may be a sites issue. If no, then it is probably an Apps Script issue.

CBMServices Web

unread,
Sep 3, 2021, 5:46:50 PM9/3/21
to google-apps-sc...@googlegroups.com
The problem with old editor is the reverse of the new one. When you make any changes, you need to deploy a new version or it will not be updated. Luckily the old editor does not change the URL when a new version is made.

So try to deploy it again as a new version with those settings and see if it fixes the problem.


Dora Samy

unread,
Sep 5, 2021, 12:19:13 AM9/5/21
to google-apps-sc...@googlegroups.com
Hi,
I have noted a peculiar problem. I checked for a user who has the problem.
He is using chromebook.
What i did is, removed file share for his mail and moved from shared folder to my drive. Then under restricted , had changed to anybody can edit. Then also same error occurring.
But when i changed the sheet linked to the script  to restricted only. Then it is working.

I am not able to understand after even removing end user mail id in the sheet attached to the script, he is getting /u/1
 in the url. This means he is using more than one gmail. but none of the gmail he is using is connected to script/sheet as i have removed his access to sheet.
And made deployment for even anonymous.
But the url changes to U/1/
Can you explain why this happens. This is the first time i am seeing, this kind of , as both script and sheet are not shared.

Brett Grear

unread,
Sep 5, 2021, 6:29:06 AM9/5/21
to Google Apps Script Community
If these users that have trouble open the site in an incognito tab, does it work?
I think this may be a known bug where people logged into multiple Google accounts will cause a webapp to fail because Google doesn't know which account to run it on. There is documentation on this but I'm out and about right now.

Zack Reynolds

unread,
Sep 6, 2021, 10:19:28 AM9/6/21
to google-apps-sc...@googlegroups.com
So I ran into this issue and it was because the web app was hosted on a Workspace account, and so it didn't work reliably across people that were or weren't logged in. What I ended up doing was adding the domain into the embedded URL that I used in the iframe code.


--
Zack Reynolds
email. zackre...@gmail.com


--
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.

Dora Samy

unread,
Sep 10, 2021, 5:26:31 PM9/10/21
to Google Apps Script Community
Hi,
Yes the problem persist.
But i found out the problem with one user, he has four accounts one gmail  domain and other normal 3 gmail accounts.
And the problem was the sheet through which web app was created was not shared to his account, but it was in shared folder which had one of his mail.
I removed all the share and moved the file to my drive, then it worked. But what i failed to understand is, only one of his mail was shared why was such issue came,
eventhough he has multiple accounts.
I thought only  when the script or sheet is shared to multiple accounts of same user there will be issue. But this was opposite.

I have one doubt, when a domain user creates a web app, how can he share outside this organization to public to be embed in google site?
is that possible?
Reply all
Reply to author
Forward
0 new messages