Google Apps Script errors, explained one by one
Last verified
Google Apps Script reports errors in three places. When you run a function from the editor, the message appears in the execution log at the bottom of the screen. When a trigger, web app or add-on runs the code, the failure is recorded on the project's Executions page, and trigger owners can also receive a failure summary email. When a custom function fails, the message appears as a cell error in the spreadsheet. The text is the same in each place, and it is what each entry below is named after.
Most messages fall into a few families. Time limits stop a single run: 6 minutes for a script, 30 seconds for a custom function or simple trigger. Daily quotas, such as URL Fetch calls and total trigger runtime, are counted per user across every script and add-on that runs as that account, and Google says they reset 24 hours after the first request. Concurrency limits cap how many executions can run at once. Authorization errors mean the code needs a permission it was never granted, often because it runs in a trigger that cannot show a consent dialog. Finally, UrlFetchApp errors describe what happened when your script called an outside server.
Quotas and limits quoted here come from Google's official quotas page and differ between consumer (gmail.com) and Google Workspace accounts where noted. A few messages, such as Bandwidth quota exceeded and Address unavailable, are not documented by Google; their entries say so and rely on consistent developer reports. If your script feeds a spreadsheet that also uses IMPORT formulas, the Google Sheets import errors reference covers those messages.
Official reference: Google for Developers - Quotas for Google Services
How to read a Apps Script error
A failed run in the execution log or on the Executions page shows the exception message and the stack, with file, line and column:
Error Exception: Request failed for https://api.example.com returned code 403. Truncated server response: {"error":"forbidden"} (use muteHttpExceptions option to examine full response)
fetchOrders @ Code.gs:14
dailySync @ Code.gs:3The first line is the message to look up below. The lines after it are the call stack, innermost first: here the failure happened at line 14 of Code.gs inside fetchOrders, which was called by dailySync. On the Executions page, the Type column (Editor, Time-Driven, Web App, Trigger) tells you what started the run, which matters for authorization and event-object errors.
All 16 messages
Jump to: Execution time limits (1) · Daily and rate quotas (3) · Concurrent executions (2) · UrlFetchApp and external requests (3) · Authorization and permissions (2) · Triggers, events and entry points (3) · Google service errors (2)
Execution time limits
Daily and rate quotas
| Message |
|---|
Service invoked too many times for one dayException: Service invoked too many times for one day: urlfetch. |
Service using too much computer time for one dayService using too much computer time for one day. |
Service invoked too many times in a short timeException: Service invoked too many times in a short time: Calendar. Try Utilities.sleep(1000) between calls. |
Concurrent executions
| Message |
|---|
Too many simultaneous invocations: SpreadsheetsException: Too many simultaneous invocations: Spreadsheets |
Too many scripts running simultaneously for this Google user accountThere are too many scripts running simultaneously for this Google user account. |
UrlFetchApp and external requests
| Message |
|---|
Exception: Request failed for ... returned code 4xx/5xxException: Request failed for https://api.example.com returned code 401. Truncated server response: {"error":"invalid_token"} (use… |
Exception: Address unavailableException: Address unavailable: https://example.com/api |
| Exception: Bandwidth quota exceeded |
Authorization and permissions
| Message |
|---|
Authorization is required to perform that actionAuthorization is required to perform that action. |
You do not have permission to call UrlFetchApp.fetchException: You do not have permission to call UrlFetchApp.fetch. Required permissions:… |
Triggers, events and entry points
| Message |
|---|
| TypeError: Cannot read properties of undefined (reading 'range') |
Script function not foundScript function not found: doGet |
This script has too many triggersThis script has too many triggers. Triggers must be deleted from the script before more can be added. |
Google service errors
| Message |
|---|
Service Spreadsheets timed out while accessing documentException: Service Spreadsheets timed out while accessing document with id 1AbC...xyz. |
We're sorry, a server error occurredException: We're sorry, a server error occurred. Please wait a bit and try again. |
Definitions
- Google Apps ScriptGoogle Apps Script is Google's cloud-hosted JavaScript platform for automating Google Workspace: Sheets, Gmail
- Error HandlingError handling is the practice of anticipating, detecting, and responding to errors in software execution, inc
- Rate LimitingRate limiting is a technique that controls the number of requests a client can make to a server within a given
- OAuth 2.0OAuth 2.0 is the IETF authorization standard (RFC 6749) that lets an app access your account in another servic
Apps Script guides, limits and tools
Other error directories
- Cloudflare error pages errors16 messages
- Google Sheets IMPORT functions errors15 messages
- HTTP errors in web scraping and automation errors15 messages
- Make (formerly Integromat) errors9 messages
- n8n errors11 messages
- Playwright errors16 messages
- Puppeteer errors15 messages
- Selenium WebDriver errors14 messages
- Zapier errors8 messages
Frequently asked questions
What is the Apps Script execution time limit?
Google's quotas page lists 6 minutes per execution for scripts on both consumer and Google Workspace accounts, 30 seconds per execution for custom functions, and 30 seconds for Workspace add-on runs. Simple triggers such as onEdit are also limited to 30 seconds. Longer jobs need to be split into batches that save progress and continue on a time-driven trigger.
How many UrlFetchApp calls can I make per day?
Google lists 20,000 URL Fetch calls per day for consumer accounts and 100,000 per day for Google Workspace accounts, counted per user across all scripts. Individual calls are also limited to a 50 MB response, 50 MB POST size, 2 KB URL length and 100 headers. Exceeding the daily count produces 'Service invoked too many times for one day: urlfetch.'
When do Apps Script quotas reset?
Google's quotas page says quotas are per user and reset 24 hours after the first request. There is no fixed midnight reset, and Google does not provide a dashboard showing how much of a quota remains, so logging your own call counts is the practical way to track usage.
How long can triggers run in total per day?
Total trigger runtime is limited to 90 minutes per day on consumer accounts and 6 hours per day on Google Workspace accounts. Every time-driven or event-driven execution counts. Exceeding it produces 'Service using too much computer time for one day.' Each user can have up to 20 triggers per script.
Why does my onEdit function fail when I click Run?
Because a trigger function expects an event object that only exists when the event actually happens. Running onEdit from the editor passes nothing, so code like e.range throws 'Cannot read properties of undefined'. Test it by editing a cell, or call it from a helper that builds a fake event object.
Why can't my onEdit trigger send email or call an API?
Google documents that simple triggers can't access services that require authorization. MailApp, UrlFetchApp, and opening other files all need authorization. Rename the function and attach it to an installable On edit trigger from the Triggers page; installable triggers run with the authorization of the user who created them.
How do I see the full error response from UrlFetchApp?
Pass muteHttpExceptions: true in the fetch options. Google's reference says the fetch then does not throw when the response code indicates failure. Read response.getResponseCode() and response.getContentText() to see the status and full body instead of the truncated text in the exception.
Where can I see why a triggered script failed?
Open the project in the Apps Script editor and go to Executions. Each run shows its type, start time, duration, status and, for failures, the error message and log output. Trigger owners can also set failure notification emails on the Triggers page, which send a summary of failed runs.
Run the job somewhere with its own limits
If a script keeps hitting its host's quotas, an Autonoly workflow can run the same steps on a schedule in an isolated cloud container, and the AI agent has a terminal with Python for steps that need code. Autonoly has limits of its own, priced in credits.