A Google Apps Script can pass a manual test and still fail on a trigger, with different input, or after reaching a usage limit because those runs do not always share the same data, authorization, account identity, or execution conditions. Start with the failed run in Executions, reproduce its context, and then check the code path, permissions, quotas, and service status.
Why does my Google Apps Script work manually but fail on a trigger?
A manual editor run and a trigger run are different execution contexts. An installable trigger runs as the Google account that created it, not necessarily the person who last edited or tested the script. It also receives an event object describing the event or schedule that started it. If the trigger reaches code that needs a permission that has not been granted, it cannot pause to show an authorization prompt.
As an Amazon Associate I earn from qualifying purchases.
Google’s installable trigger documentation explains trigger identity and behavior. The authorization guide says the trigger creator must authorize the script. When code adds a required permission, have that creator run an appropriate function manually in the editor and complete the authorization flow before relying on the background trigger.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Also compare the event data and identity assumptions. An event-driven function may receive fields that a manual run does not, and available user identity information can depend on the event’s authorization mode. If a call to Session.getActiveUser() or Session.getEffectiveUser() does not provide what the script expects, inspect the event’s authMode and follow Google’s guidance for that mode.
#1 Best Overall
- Attention-grabbing design meets the latest evolution of the Google Pixel Camera on the new Google Pixel 11 Pro; Gemini Intelligence helps manage details so you can live in the moment[1]; and the phone is available in two sizes
- Unlocked Android phone gives you the flexibility to change carriers and choose your own data plan: Works with Google Fi, Verizon, T-Mobile, AT&T, and other major carriers[2]
- Stay informed without looking at your screen: When your phone is face down, Pixel HiLight gently alerts you with subtle glowing lights when your favorite contacts are calling or you’re talking with Gemini; exclusive to Google Pixel 11 Pro phones
- Magic Capture catches the moment as you live it: With just one tap, Pixel 11 Pro captures video and photos, and automatically edits, crops, and unblurs a curated collection, ready to share – and you get the memory of how it felt to be in the moment
- Two new cameras for more brilliant photos: A larger telephoto sensor captures 30% more light for clear, beautiful photos and videos, even in the dark[3]; Pixel’s longest zoom ever helps you capture details from impressive distances[4]
How do I debug Google Apps Script?
- Open the failing execution. In the Apps Script editor, choose Executions, then select the failed or timed-out run. Note its function, time, status, error text, and line number. For a trigger, check its failure notification as well. Google’s troubleshooting guide describes execution records and common failure causes.
- Classify what happened. A syntax error is generally caught when you save. A runtime error occurs when the code executes and reaches a failing operation. If execution completed but the result is wrong, investigate the logic and values rather than looking only for an exception.
- Reproduce the failing path. Match the function, input, account, and event context as closely as possible. A successful manual run does not establish that a scheduled or event-driven run has the same permissions or identity.
- Log the smallest useful set of values. Use
Loggerorconsoleto record relevant inputs, branch choices, and service-call results around the suspect operation. Avoid recording private user data unnecessarily. - Pause execution to inspect state. Set a breakpoint before the suspect line, choose debug mode, and step through the code while inspecting variables. This is especially useful when the run completes but produces an unexpected result.
- Check external constraints. Look for authorization or quota errors, runtime limits, administrator policies, unavailable services, missing libraries, and account-access problems. Check Google Workspace’s status dashboard if a service outage is plausible.
- Rerun the same path. Confirm both the execution status and the output after the change. If the repair added a permission, make sure the trigger creator authorized it before expecting a background run to succeed.
Why did my Apps Script stop working?
New or unusual input exposed a runtime error
Code can be syntactically valid and still fail when it encounters missing, malformed, or unexpected data. For example, an operation that assumes a value exists may throw only when a later event supplies an empty value. For a silent wrong result, log values at the boundary between input parsing and the operation that produces the output, then inspect relevant branches with breakpoints.
A permission, policy, or account condition changed
A new service call can require additional authorization. A Workspace administrator policy may also restrict access, and identity details may not be available in every execution mode. A script can additionally fail if a library is missing or if multiple signed-in Google accounts cause the wrong account to be used. Google lists these among causes in its troubleshooting guidance.
Rank #2
- Google Pixel 10a is a durable, everyday phone with more[1]; snap brilliant photography on a simple, powerful camera, get 30+ hours out of a full charge[2], and do more with helpful AI like Gemini[3]
- Unlocked Android phone gives you the flexibility to change carriers and choose your own data plan; it works with Google Fi, Verizon, T-Mobile, AT&T, and other major carriers
- Pixel 10a is sleek and durable, with a super smooth finish, scratch-resistant Corning Gorilla Glass 7i display, and IP68 water and dust protection[4]
- The Actua display with 3,000-nit peak brightness shows up clear as day, even in direct sunlight[5]
- Plan, create, and get more done with help from Gemini, your built-in AI assistant[3]; have it screen spam calls while you focus[6]; chat with Gemini to brainstorm your meal plan[7], or bring your ideas to life with Nano Banana[8]
A service was temporarily unavailable
Some failures are outside the script itself. Review the exact error and the Google Workspace Status Dashboard to see whether a relevant service reports an incident. If the service is healthy, continue investigating the script’s permissions, inputs, and execution record rather than treating every transient error as a code defect.
Recommended Free Tools
Where do I find Apps Script execution logs?
For a run’s status and associated records, open Executions in the Apps Script editor and select the relevant execution. For quick development checks, use the execution log with Logger or console. Google describes that log as a real-time debugging aid with short-lived retention; it is not intended to be the persistent store for production diagnostics.
For logs that need to remain available for days or help diagnose a multi-user production workflow, use Cloud Logging. Unhandled exceptions can be logged with stack traces and surfaced through Error Reporting, which aggregates runtime errors. Cloud-based logging and reporting depend on the relevant Cloud project setup and access; some features require a standard, user-managed Cloud project.
Why does Apps Script say authorization is required?
Apps Script services can require permission to access data or act on a user’s behalf. If a script adds a service or otherwise needs a new scope, an interactive run may present an authorization flow. A trigger cannot stop and ask its creator to approve that permission in the middle of a background execution. The account that created the installable trigger must authorize the updated script manually before the trigger can use the new permission.
Rank #4
- Google Pixel 10 Pro is the ultimate Pixel experience, featuring advanced AI with Gemini, unbelievable camera quality, impeccable design in two sizes, and the next-gen Google Tensor G5 chip[1]
- Unlocked Android phone gives you the flexibility to change carriers and choose your own data plan[2]; it works - Google Fi, Verizon, T-Mobile, AT&T, and other major carriers
- Get a head start on syncing your data before it even arrives: After you purchase your new Pixel, look for an email that explains how to transfer your photos, videos, passwords, and more in just a few quick steps[11]
- Pixel’s pro camera system makes everything look amazing, even in low light; capture more of the scene with advanced Google AI models, and bring out incredible details with 100x Pro Res Zoom, stunning 50 MP images, and super steady videos in 8K[10]
- Pixel 10 Pro is built with durable aluminum and Corning Gorilla Glass Victus 2 for scratch and drop resistance; the 6.3-inch Super Actua display with 3,300-nit peak brightness is easy on the eyes, even in direct sunlight[3,13,18]
When diagnosing an authorization error, check which account owns the trigger and whether that account completed authorization for the current code. Also consider whether a Workspace administrator’s policy blocks the requested access. Google’s authorization documentation covers scopes and consent behavior.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsDid my script hit a quota or time limit?
Google says exceeding a quota or limitation throws an exception and stops execution. The limits are per user, differ for some services between consumer and Workspace accounts, and may change without notice. The live Apps Script quotas table should be checked when diagnosing a failure; the values below are a Google for Developers snapshot accessed in 2026, not a guarantee for every service tier or a promise that the limits will remain unchanged.
Best Value
- Google Pixel 7 is powered by Google Tensor G2; it’s faster, more efficient, and more secure, with the best photo and video quality yet on Pixel[1].Other camera description:Front,Rear.Bluetooth Version 5.2 with dual antennas for enhanced quality and connection.
- Unlocked Android 5G phone gives you the flexibility to change carriers and choose your own data plan[2]; works with Google Fi, Verizon, T-Mobile, AT&T, and other major carriers
- Pixel’s Adaptive Battery can last over 24 hours; when Extreme Battery Saver is turned on, it can last up to 72 hours[3]
- The 6.3-inch Pixel 7 display is super sharp, with rich, vivid colors; it’s fast and responsive for smoother gaming, scrolling, and moving between apps[4]
- Google Pixel 7 has wide and ultrawide lenses with up to 8x Super Res Zoom[5]; and Cinematic Blur brings more drama to your videos
| Limit in the 2026 access snapshot | Consumer account | Workspace account |
|---|---|---|
| General script runtime per execution | 6 minutes | 6 minutes |
| Custom function runtime per execution | 30 seconds | 30 seconds |
| Simultaneous executions per user | 30 | 30 |
| Triggers per user per script | 20 | 20 |
The quota page states that quotas reset 24 hours after the first request and that limits are subject to change at any time without notice. Check the specific service quota named in the exception, not only the general runtime figure: a script can hit a service-specific limit before its overall execution time runs out.
Which Apps Script debugging method should I use?
| Method | Best for | Limitation |
|---|---|---|
Execution log with Logger or console |
Quick checks of selected values during development | Short-lived; not the persistent production log store |
| Execution history | Finding failed, timed-out, or unexpected runs and their context | Locates the run but does not by itself explain the cause |
| Debugger and breakpoints | Inspecting variable state and stepping through a reproducible path | Generated code is not displayed as ordinary editor source |
| Cloud Logging | Retained logs and multi-user production diagnosis | Use depends on Cloud project setup and access |
| Error Reporting | Aggregating logged runtime exceptions and stack traces | Requires exceptions to be logged and access to the Cloud project |
| Gemini in the editor | Getting a proposed explanation or code change based on an error and surrounding code | Review the suggestion and rerun the script to verify it |
What does “Source code for the current line is not available” mean?
The Apps Script editor’s debugger cannot present dynamically generated JavaScript as a normal source file. If you step into code created with eval() or new Function(), the debugger may show “Source code for the current line is not available.” That message does not necessarily mean the debugging session has ended. Step out or resume execution until it leaves the generated code, then continue inspecting the regular script.
Can Gemini help debug an Apps Script?
Gemini in the Apps Script editor can propose a diagnostic explanation and a code diff based on the error and surrounding code. Treat the output as a suggestion: inspect the proposed change, check that it fits the script’s intended behavior, and rerun the failing path. Google’s Gemini documentation describes the editor workflow; feature availability can change.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




