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
| Pattern | V8 error | Guide |
|---|---|---|
for each (x in y) | Unexpected identifier 'each' | for each |
catch (e if …) | Unexpected token 'if' | conditional catch |
E4X <xml/>, new XML(), .@id | Unexpected token '<' / XML is not defined | E4X → XmlService |
function class(), var import | Unexpected token 'class' | reserved words |
reassigned const | Assignment to constant variable. | const |
same const in two files | Identifier has already been declared | duplicates |
function (x) x * x, let (a = 1) {} | Unexpected identifier | expression closures |
__iterator__, StopIteration | StopIteration is not defined | iterators |
toSource(), uneval() | toSource is not a function | toSource |
java.*, Packages | java is not defined | Java bridge |
ScriptProperties, UiApp, DocsList | ScriptProperties is not defined | legacy services |
One parse error stops the whole file, so every function in it fails — even ones that look unrelated.
3. Check what behaves differently
getYear()→ returns 126toLocaleDateString()→ short formaterror.lineNumber→ undefinedsetValue(undefined),JSON.stringify(enum)→ changed outputObject.keys(this),instanceofin libraries, prototype changes → globalsnew Date("…")→ parsing,formatDate('YYYY')→ wrong yearwith (…)andevalstill run, but audit code strings passed toevalfor Rhino-only syntax.
4. Test and redeploy
- Run each trigger function from the editor; re-authorize if prompted; check Executions.
- Web apps and add-ons: Deploy → Manage deployments → New version, and point every deployment at it.
- Libraries: publish a new version and tell callers to update.
- Standalone scripts: users need at least view access for triggers to keep working on V8.
- 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.