13

I'm using multiple Google accounts. In one of them (not default) I created Google Spreadsheet file and I want to create Script connected to it. Nothing complicated. But the problem is that after clicking Tools > Script Editor I'm being redirected to default user or I see this screen:

Sorry, unable to open the file at present

The same problem I have when trying to use: script.google.com

What can I do to enable Script editor?

Rubén
  • 34,714
  • 9
  • 70
  • 166
emendelski
  • 317
  • 2
  • 12

8 Answers8

10

I know you asked this 9 months ago, but here is my solution;

  • Sign out of all google accounts except the owner of the spreadsheet
  • You can now access the scripts and macros pages (go there)
  • Create a bookmark of them (this saves which profile is logged in)
  • Now sign back into all your profiles
  • Voila!

You will be able to access the scripts or macros via the bookmarks without getting the error page.

Julien Boudreau
  • 116
  • 1
  • 3
5

This is a reported bug.

Go give it a ☆ if you want to let Google know that this affects you.

iansedano
  • 6,169
  • 2
  • 12
  • 24
2

You can consider appending authuser=email to the URL to open the script with a specific Google account.

For example, script.google.com...?param=value&authuser=email@example.com

Amit Agarwal
  • 10,910
  • 1
  • 32
  • 43
  • That works if the script already exists. If it doesn't, it appears to me that the script is created in the wrong account, so adding authuser results in a permissions error. – Reece May 29 '20 at 17:06
1

I was not able to reproduce the problem. Perhaps it's a glitch or there is something wrong that requires some troubleshooting techniques that are off-topic on this site.

As a workaround, for the account having problems, use another Google Chrome profile, Incognito mode, or another browser.

By the other hand, it's possible that there isn't any wrong and it's just something related to your specific scenario.

From Sign in to multiple accounts at once

Sometimes settings might carry over

If you're signed in to multiple accounts at the same time, sometimes we can't tell which account you're using. For example, if you're signed in to two accounts and you open a new browser window, we aren't sure which account you want to use. In cases like these, Google might apply settings from your default account, like its Web & App Activity and Ads Personalization settings.

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • The incognito works fine if you logged into one account normally and another incognito. But don't try two incognito's to login to yet another account because they seem to be connected together some how. And of course you can use different browsers. I however like to debug code in google chrome because I'm more familiar with their developer tools. – Cooper Dec 08 '17 at 16:46
  • @Cooper: Have you tried to reproduce the problem? (I updated my answer). – Rubén Dec 08 '17 at 16:57
  • Yes. I've seen that screen before when I've tried to login to two accounts with same browser. It doesn't work. I must admit that I didn't try to research the issue. I just moved on to another browser and dealt with the loss of chrome developer tools. But recently I tried the incognito window and it does the trick for me. I have my old account open and the new Google Business Account with AppMaker both running and developing code at the same time. – Cooper Dec 08 '17 at 17:10
  • 1
    @Cooper Maybe this happens when having a G Suite accounts as the default and the secondary account from a different domains. I only tried with a profile having a gmail.com as the default account and several G Suite accounts as secondary accounts. – Rubén Dec 08 '17 at 17:14
  • 1
    None of my accounts is part of G Suite. I checked this issue in a few browsers and the problem is the same everywhere. Only default account has access to Google Apps Scripts. – emendelski Dec 08 '17 at 22:47
1

If someone needs a quick fix for this :

At the end of the url change the "authuser=1" by the index of the Google Account you want to log with. (0 is the first one, 1 is the second)

https://i.stack.imgur.com/qJows.png

0

google's default account (the first one you sign on with) has to be the owner of the sheet

Nils Riga
  • 90
  • 2
  • 15
0

Based on @iansedano's answer, you can share the file with the default chrome user and open the same link in a new tab again to resolve the issue.

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
-1

You can also open a new incognito window, paste your sheet url there (you'll need to authenticate). Then you can open Tools -> Script Editor

Mirko
  • 757
  • 9
  • 13
  • 1
    Idk, for some reason you got downvoted, but it actually works. There is a bug if you have multiple google accounts. – antshar Jan 08 '22 at 15:04