Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Kk, got a more contained example of the issue using a very small add-on.
source:
https://script.google.com/d/1o3AvP1zRrx7WnDEx_fV_IhS2fc3QstuKHvFaBsqjcffqxdhLNjC7j62S/edit?usp=sharing
add-on listing:
https://chrome.google.com/webstore/detail/dcpikpbagjcipkfmacefilfbkdjlfjmd
Because I've made the add-on "unlisted" there are slightly different reproduction steps:
* Steps 1-4 are the same as in my original post
5. In the Incognito window that you're testing this in, open the following link
https://chrome.google.com/webstore/detail/auth-issue-tester/dcpikpbagjcipkfmacefilfbkdjlfjmd?authuser=1
The "authouser=1" query parameter is very important in the above link as otherwise the add-on will be installed for the "default" account and the issue won't express.
6. Click the "+ Free" button on the above linked page to install the add-on
7. In the new Sheet you will be brought to after clicking "+ Free", wait a few seconds for prompt to appear. Click "continue" and then authorize the add-on
8. Open the Dev console
9. Go to "Add-Ons" => "Auth Issue Tester" => "Open Sidebar"
10. Note the error printed to the console and inserted into the sidebar
Demo of the above listed steps 5-10:https://cl.ly/0p0v080F2j1s
source:
add-on listing:
Because I've made the add-on "unlisted" there are slightly different reproduction steps:
* Steps 1-4 are the same as in my original post
5. In the Incognito window that you're testing this in, open the following link
The "authouser=1" query parameter is very important in the above link as otherwise the add-on will be installed for the "default" account and the issue won't express.
6. Click the "+ Free" button on the above linked page to install the add-on
7. In the new Sheet you will be brought to after clicking "+ Free", wait a few seconds for prompt to appear. Click "continue" and then authorize the add-on
8. Open the Dev console
9. Go to "Add-Ons" => "Auth Issue Tester" => "Open Sidebar"
10. Note the error printed to the console and inserted into the sidebar
Demo of the above listed steps 5-10:
fo...@blockspring.com <fo...@blockspring.com> #3
Thank you for your report. The Apps Script team is investigating.
[Deleted User] <[Deleted User]> #4
ni...@openadviser.com <ni...@openadviser.com> #5
I was the person who originally reported this issue to Streak.
zm...@gmail.com <zm...@gmail.com> #6
I am facing similar issue. Getting error "You do not have permission to call showSidebar" on Opening the file (Docs, Sheets etc..)
Since yesterday, I am getting an exception when calling showSidebar() function with in onOpen().
I am building custom menu onOpen and calling showSidebar() function with in onOpen(). I want run check a few things in a Google Sheet every time the file is open and display an alert and sidebar if certain condition is not met.
The functionality was working perfectly, until yesterday!!
Below is the error that I am getting onOpen()
"You do not have permission to call showSidebar"
I have been using the same script from beginning of this year and never had this issue. I started seeing it since yesterday. Just wondering recent changes to OAuth scope to include " container.ui " is causing the issue.
Since yesterday, I am getting an exception when calling showSidebar() function with in onOpen().
I am building custom menu onOpen and calling showSidebar() function with in onOpen(). I want run check a few things in a Google Sheet every time the file is open and display an alert and sidebar if certain condition is not met.
The functionality was working perfectly, until yesterday!!
Below is the error that I am getting onOpen()
"You do not have permission to call showSidebar"
I have been using the same script from beginning of this year and never had this issue. I started seeing it since yesterday. Just wondering recent changes to OAuth scope to include " container.ui " is causing the issue.
db...@gmail.com <db...@gmail.com> #7
We and our clients numbering around 100 with Google App Scripts attached to spreadsheets found around the 11th of Nov that they needed to re-authorise apps to run. Notification email have been sent to us and our clients. Example below.
We alone received over 1000 email in one day like this for our internal application triggered either by Time or Form Submit.
We have spend over 100 hours reauthorising Google App Scrips so far. Our concern is that will this happen again and why has it happened?
------ Email Message ------
Your script, Client List, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
The script is used by the document Client List - Do Not Remove.
Summary:
Error Message Count
You do not have permission to call showModalDialog (line 16, file "Menu") 4
Start Function Error Message Trigger End
11/14/17 10:55 AM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 10:55 AM
11/14/17 12:56 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 12:56 PM
11/14/17 1:02 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 1:02 PM
11/14/17 1:15 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 1:15 PM
Sincerely,
Google Apps Script
We alone received over 1000 email in one day like this for our internal application triggered either by Time or Form Submit.
We have spend over 100 hours reauthorising Google App Scrips so far. Our concern is that will this happen again and why has it happened?
------ Email Message ------
Your script, Client List, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
The script is used by the document Client List - Do Not Remove.
Summary:
Error Message Count
You do not have permission to call showModalDialog (line 16, file "Menu") 4
Start Function Error Message Trigger End
11/14/17 10:55 AM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 10:55 AM
11/14/17 12:56 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 12:56 PM
11/14/17 1:02 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 1:02 PM
11/14/17 1:15 PM onOpen You do not have permission to call showModalDialog (line 16, file "Menu") open 11/14/17 1:15 PM
Sincerely,
Google Apps Script
an...@gmail.com <an...@gmail.com> #9
I am getting the same "you do not have the permission to call..." on many of the scripts I have in place. This started on Nov 3rd. I also go the "you don't have permission to call showSidebar". If I just go in and manually run any of the functions, the script re-authorizes and starts running again.
ja...@gmail.com <ja...@gmail.com> #10
Folks how can we get this escalated for an action by Google team ? Its been close to 15 days since the issue started and there has been no action!!
ko...@gmail.com <ko...@gmail.com> #11
Thank you for your reports. The issue originally reported is due to recent improvements in Sheets' ability to handle multiple logged in accounts. These improvements expose limitations in Apps Script's ability to do the same. In particular, users may experience issues if they (1) are logged into more than one gmail.com account or more than one account belonging to the same G Suite domain, (2) have selected an account other than the default account while using Docs, Sheets, Slides, or Forms, and (3) use add-ons or the script editor.
zm...@gmail.com <zm...@gmail.com> #12
Thanks for the clarification of the issue - that matches what we've been seeing. Are you all actively working on a fix or is there a workaround? This is a pretty frustrating experience for our users.
pk...@gmail.com <pk...@gmail.com> #13
We're seeing the same. In addition, Session.getEffectiveUser().getEmail() is no longer reliable, if you're logged in with multiple gmail accounts it always returns the first one. Quite a serious problem, please fix this urgently.
ja...@gmail.com <ja...@gmail.com> #14
We have the same issue which is causing our Supermetrics Data Studio community connector to throw errors.
ko...@gmail.com <ko...@gmail.com> #15
We have the same issue which is causing all of our google sheet queries to break. Its broken our entire data pull that we use with DOMO.
ja...@gmail.com <ja...@gmail.com> #16
I can confirm that this issue exists for the Search Analytics for Sheets add-on as well.
pk...@gmail.com <pk...@gmail.com> #17
I have the same issue
[Deleted User] <[Deleted User]> #18
Same issue here, all of my reports are down.
ja...@gmail.com <ja...@gmail.com> #19
I have the same issue
[Deleted User] <[Deleted User]> #20
We have a very urgent problem. All our reports in Supermetrics with data from Analytics are failing. We get the message "Error: 403 The caller does not have permission (view ID: 12511297)" and the "view ID" number in the error message keeps changing. We have tried using the "Refresh account list " and sometimes it help, but when we run it again we get the same message "Error: 403 The caller does not have permission (view ID"
ko...@gmail.com <ko...@gmail.com> #21
Same problem - all our dashboards on data pulled by Supermetrics are broken - please fix!
[Deleted User] <[Deleted User]> #22
Any news on this?
[Deleted User] <[Deleted User]> #23
My script is also affected. Any news?
ko...@gmail.com <ko...@gmail.com> #24
Any news Google?
[Deleted User] <[Deleted User]> #25
Any news on this?
ko...@gmail.com <ko...@gmail.com>
ek...@google.com <ek...@google.com>
mi...@gmail.com <mi...@gmail.com> #26
Any new info?
kd...@ext.uber.com <kd...@ext.uber.com> #27
Any update regard this issue .
si...@gmail.com <si...@gmail.com> #28
Ya it's odd. I have been experiencing issues for awhile on this and never knew about this forum to track issues. So cool Goog!
[Deleted User] <[Deleted User]> #29
I'm starting to think Google team also don't know about this forum :/
ra...@nomad.systems <ra...@nomad.systems> #30
I wrote an article explaining how we are currently dealing with this issue in add-ons like Yet Another Mail Merge:
https://sites.google.com/site/scriptsexamples/home/announcements/multiple-accounts-issue-with-google-apps-script
Note that there are 2 cases to handle. The "authorization is required" error is thrown when the other account has not granted permissions to your script. But if both accounts have granted permissions, then the script might run well with the permissions of the wrong account (which might be worse: eg: emails being sent from the wrong account).
Note that there are 2 cases to handle. The "authorization is required" error is thrown when the other account has not granted permissions to your script. But if both accounts have granted permissions, then the script might run well with the permissions of the wrong account (which might be worse: eg: emails being sent from the wrong account).
al...@apps4gs.com <al...@apps4gs.com> #31
no response Google? I'm getting user emails about this all the time.
oh...@gmail.com <oh...@gmail.com> #32
This issue already obtained 90+ stars, why Google isn't taking any action on this?
na...@apps4gs.com <na...@apps4gs.com> #33
Are you realy surprized with it? I'm not :)
ki...@familyfreshfoodservice.com <ki...@familyfreshfoodservice.com> #34
A user can be logged into multiple Google accounts in the browser. But what account is your add-on or Apps Script code using? If your add-on or Apps Script code tries to use an account that it is not authorized to use, then there will be an authorization error.
How do you test for that?
If you want to "manually" verify that this is a problem, you can test for whether this is related to the multiple accounts issue, by either having the person log out of all accounts, and then log back into the account that installed the add-on, or have them open up the Chrome browser in incognito mode, and log into the account that installed the add-on.
The problem occurs when a google.script.run.FUNCTION() call is made from the HTML after the HTML in your Web App, sidebar, dialog box has loaded.
When the HTML first loads, you must run a scriptlet, which runs on the server, and get the effective user. That gives you the account name that the Apps Script code is running under. Then, as soon as the HTML loads, you immediately make a google.script.run.function() call to the server and get the user account name again. Then if the two are not the same, there is a problem.
function getAccountName_() {
//Put user email into html when it loads for determining whether user is the authorized user
return Session.getEffectiveUser().getEmail();
}
<input id="idAccountOfEffectiveUsr" type="text" style="display:none" <?!= getAccountName_() ?>/>
<script language="javascript">
//console.log('it ran on load one')
window.onload = function() {
google.script.run
.withFailureHandler(failedAcctTest)
.hazAcctConflict()
//console.log('it ran on load two')
//AlanWells.shwFirstTimeHlp();
};
window.failedAcctTest = function(rtrn) {
var usrWhoLoaded = document.getElementById('idAccountOfEffectiveUsr').value;
if (usrWhoLoaded !== rtrn) {
showErrMsg('The Add-on loaded under the account: \n\n' + usrWhoLoaded + '\n\nBut you are also logged into ' +
'account: ' + rtrn + "\n\nYou are logged into multiple accounts which has caused an authorization error. \n\n" +
"You must either log out of all accounts, and log back into the account that installed the add-on; or open " +
"an incognito window, log in and use the add-on from that window");
}
}
</script>
How do you test for that?
If you want to "manually" verify that this is a problem, you can test for whether this is related to the multiple accounts issue, by either having the person log out of all accounts, and then log back into the account that installed the add-on, or have them open up the Chrome browser in incognito mode, and log into the account that installed the add-on.
The problem occurs when a google.script.run.FUNCTION() call is made from the HTML after the HTML in your Web App, sidebar, dialog box has loaded.
When the HTML first loads, you must run a scriptlet, which runs on the server, and get the effective user. That gives you the account name that the Apps Script code is running under. Then, as soon as the HTML loads, you immediately make a google.script.run.function() call to the server and get the user account name again. Then if the two are not the same, there is a problem.
function getAccountName_() {
//Put user email into html when it loads for determining whether user is the authorized user
return Session.getEffectiveUser().getEmail();
}
<input id="idAccountOfEffectiveUsr" type="text" style="display:none" <?!= getAccountName_() ?>/>
<script language="javascript">
//console.log('it ran on load one')
window.onload = function() {
google.script.run
.withFailureHandler(failedAcctTest)
.hazAcctConflict()
//console.log('it ran on load two')
//AlanWells.shwFirstTimeHlp();
};
window.failedAcctTest = function(rtrn) {
var usrWhoLoaded = document.getElementById('idAccountOfEffectiveUsr').value;
if (usrWhoLoaded !== rtrn) {
showErrMsg('The Add-on loaded under the account: \n\n' + usrWhoLoaded + '\n\nBut you are also logged into ' +
'account: ' + rtrn + "\n\nYou are logged into multiple accounts which has caused an authorization error. \n\n" +
"You must either log out of all accounts, and log back into the account that installed the add-on; or open " +
"an incognito window, log in and use the add-on from that window");
}
}
</script>
ma...@roche.com <ma...@roche.com> #35
Comment has been deleted.
da...@richinsight.co.uk <da...@richinsight.co.uk> #36
I can confirm the issue is not reproduced with Incognito window, however, this does not really mean it is resolved. Writing this in order to prevent this issue to be accidentally closed.
Description
Google Scripts no longer works for me.
Example 1: Drag down a fun "hello world" function and you'll see a bunch of #ERROR.
Example 2: Drag down a function that makes a URLFetch and you'll see all #ERROR.
If I run a custom function in one cell, it's likely to work. But as soon as I drag, #ERROR.
See example:
Really looking forward to the help. I have thousands of users of my script running into this problem. Thank you!