3

I recently migrated one of my projects to the new V8 engine of appscript.I am getting this exception

Exception: You do not have permission to call Session.getActiveUser. Required permissions: https://www.googleapis.com/auth/userinfo.email..Session.getActiveUser is not accessible without permission

Any ideas would be appreciated

Rubén
  • 34,714
  • 9
  • 70
  • 166
neethu
  • 73
  • 7
  • I ran into a several similar situations recently and in each case I tried adding the scope to my manifest folder even though it was already in Project Properties/ Info and I was able to continue. I don't have any explanation beyond that. Perhaps it will work for you. – Cooper Feb 27 '20 at 05:08
  • Even I added the scope to my manifest folder..still no luck – neethu Feb 27 '20 at 05:31
  • I suppose it's time to submit it as an issue. – Cooper Feb 27 '20 at 05:35
  • Try using Session.getEffectiveUser() – Anees Hameed Feb 27 '20 at 09:15
  • Please share the function that is throwing this error in your question. – Aerials Feb 28 '20 at 10:21
  • I experienced this precise issue with 2 scripts that were automatically migrated to V8. Reverting them to Rhino resolved the issue. I have reviewed the [documentation](https://developers.google.com/apps-script/guides/v8-runtime) and can find no explicit reason why this should fail. I am about to file an issue. Please advise if you have done so already so I can upvote instead of duplicating. – zimady Feb 28 '20 at 12:42
  • 1
    There is an [issue filed for this already](https://issuetracker.google.com/issues/149413836). Please star if you're experiencing this issue. – zimady Feb 28 '20 at 12:49
  • Apparently, the error disappeared..not sure how – neethu Mar 04 '20 at 12:34

2 Answers2

1

As stated by @zimday this isssue has been already reported in Google Issue Tracker.

You can follow the issue in this link. Give it a +1 to make Google aware of the people affected by it.

Aerials
  • 4,231
  • 1
  • 16
  • 20
Raserhin
  • 2,516
  • 1
  • 10
  • 14
1

As stated by @Raserhin, there's an open issue with google and the problem seems to be with the new App Script runtime powered by Chrome v8.

A small workaround (until the issue is resolved) will be to disable the App Script runtime as follows: (Run -> Disable App Script runtime powered by Chrome V8). The project will now run with Apps Script Legacy which does not have this issue.

Karishma Gulati
  • 703
  • 7
  • 13