Error guides

Apps Script Rhino → V8 migration checklist

Google deprecated the Rhino runtime on January 31, 2026. Scripts still on Rhino are being moved to V8 — and the ones that use Rhino-only syntax stop loading. This is the full checklist, following Google's official migration guide.

1. Switch the runtime

Editor → Project Settings → check Enable Chrome V8 runtime, or set it in appsscript.json:

{
  "timeZone": "America/New_York",
  "runtimeVersion": "V8"
}

"DEPRECATED_ES5" (or no runtimeVersion on very old projects) means Rhino.

2. Fix what won't parse

PatternV8 errorGuide
for each (x in y)Unexpected identifier 'each'for each
catch (e if …)Unexpected token 'if'conditional catch
E4X <xml/>, new XML(), .@idUnexpected token '<' / XML is not definedE4X → XmlService
function class(), var importUnexpected token 'class'reserved words
reassigned constAssignment to constant variable.const
same const in two filesIdentifier has already been declaredduplicates
function (x) x * x, let (a = 1) {}Unexpected identifierexpression closures
__iterator__, StopIterationStopIteration is not definediterators
toSource(), uneval()toSource is not a functiontoSource
java.*, Packagesjava is not definedJava bridge
ScriptProperties, UiApp, DocsListScriptProperties is not definedlegacy services

One parse error stops the whole file, so every function in it fails — even ones that look unrelated.

3. Check what behaves differently

4. Test and redeploy

  1. Run each trigger function from the editor; re-authorize if prompted; check Executions.
  2. Web apps and add-ons: Deploy → Manage deployments → New version, and point every deployment at it.
  3. Libraries: publish a new version and tell callers to update.
  4. Standalone scripts: users need at least view access for triggers to keep working on V8.
  5. Archive old Rhino versions/deployments.

Do it in one pass

Paste your code or upload the project zip — V8Shift scans all of the above with file and line numbers for free, and rewrites the safe fixes for you.

Have a whole project to migrate? Paste your .gs or upload a zip for a free V8 compatibility report — every occurrence of this pattern with file and line, plus an auto-rewritten project.
Related errors