Questions tagged [google-apps-script-runtime]

Use for questions about Google Apps Script runtime migration, comparison and common issues. Use with runtime-specific tags (like V8 and Rhino) where applicable. Do not use for questions about bugs and errors happening "at runtime".

About

Google Apps Script runtime is an engine that defines syntax rules, parses, executes, and sets interaction limits for scripts written in Google Apps Script programming language. Currently, there are two runtimes a developer can choose from (although Rhino is considered deprecated):

  1. C++ based V8 runtime (V8 engine)
  2. Java-based Rhino runtime (for backward compatibility)

Use for questions

  1. About runtime engine issues as applied to programming in Google Apps Script language
  2. About script project migration (use with all relevant runtime-specific tags)
  3. About comparisons of feature behaviour of the runtimes.

Use with either or for runtime-specific questions

Do not use for questions

About debugging issues occurring "at runtime", use with a product or API-specific tags where applicable instead.

Useful Resources

  1. V8 runtime overview
  2. Migrating to V8 runtime guide
  3. Manifest resource (runtimeVersion field)
8 questions
5
votes
1 answer

Switching from Rhino to V8 causes Error code PERMISSION_DENIED

Recently I switched my google slides script runtime from Rhino to V8. I tested my Add-on but I got an error: We're sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED. My script uses…
5
votes
2 answers

Google Apps Script inheritance on V8

I have recently noticed a weird behaviour of the V8 engine. When inheriting a class found in a separated file, the engine fails to recognise the base class, e.g. the following configuration fails: BaseFoo.ts export class BaseFoo…
3
votes
2 answers

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

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: …
2
votes
1 answer

In Google Apps Script do breakpoints work differently when using the new V8 runtime?

Using the old runtime I could set a breakpoint anywhere in my code. With the new v8 runtime breakpoints apparently have to be in the function I run from the debugger? Is this intended behavior? Am I doing something wrong in the debugger, or in my…
1
vote
2 answers

Unable to access exception properties in v8 runtime

I am trying to get the stack trace (and other details) when an exception occurs in my code. To do this the following piece of code use to work: function catchException() { var errLog = []; try { var temp; temp.split(","); …
1
vote
1 answer

V8 engine no longer breaks on errors

This issue has been reported to Google: https://issuetracker.google.com/issues/152948662 A short description of the issue In the Rhino runtime, the script debugger (script.google.com) would break on any line containing an error (handled or not) if…
1
vote
1 answer

Issue with scopes when switching Google Apps Script projects to V8 runtime

Due to Google Apps Script forcefully pushing "Rhino" to "V8" engine, Applications are moving from Rhino to V8 automatically. So our applications are asking "scopes" that need to be specified manually in "appscript.json" file. Please check the below…
0
votes
2 answers

problem using MailApp.sendEmail(emailAddress, subject, message); with the new Chrome V8 runtime

I’m running some Google Apps Script that intereracts with a Google Sheet that extracts and compares some values as the sheet is updated and sends an email if certain criteria are exceeded. It has worked solidly for over a year but recently stopped…
DRCO
  • 3
  • 3