Home Screen Is Temporarily Unavailable Try to Load It Again or Send an Error Report.

Even the virtually experienced developer rarely writes lawmaking correctly on the first try, making troubleshooting an important part of the development procedure. In this section we'll embrace some techniques that can assistance y'all find, understand, and debug errors in your scripts.

Error letters

When your script encounters an error, an error bulletin is displayed. The message is accompanied by a line number used for troubleshooting. In that location are two basic types of errors displayed in this mode: syntax errors and runtime errors.

Syntax errors

Syntax errors are caused by writing code that doesn't follow the JavaScript grammar, and the errors are detected every bit soon as you try to salve the script. For example, the following lawmaking snippet contains a syntax mistake:

          function emailDataRow(rowNumber) {   var sheet = SpreadsheetApp.getActiveSheet();   var information = sheet.getDataRange().getValues();   var rowData = information[rowNumber-1].bring together(" ";   MailApp.sendEmail('john@example.com',                     'Data in row ' + rowNumber,                     rowData); }                  

The syntax problem here is a missing ) graphic symbol at the end of the fourth line. When yous try to salve the script y'all'll go the post-obit error:

Missing ) after argument listing. (line 4)

These types of errors are commonly elementary to troubleshoot, since they are constitute right away and typically have simple causes. Y'all aren't able to save a file that contains syntax errors, meaning that simply valid code is saved into your projection.

Runtime errors

These errors are caused by using a function or class incorrectly, and can only be detected once the script has been run. For example, the following code causes a runtime error:

          function emailDataRow(rowNumber) {   var canvass = SpreadsheetApp.getActiveSheet();   var data = sheet.getDataRange().getValues();   var rowData = data[rowNumber-1].bring together(" ");   MailApp.sendEmail('john',                     'Data in row ' + rowNumber,                     rowData); }                  

The lawmaking is formatted correctly, but we are passing the value "john" for the email address when calling MailApp.sendEmail. Since this is not a valid email address the post-obit fault is thrown when running the script:

Invalid email: john (line five)

What makes these errors more challenging to troubleshoot is that often the data you are passing into a function is not written in the code, but instead pulled from a spreadsheet, class, or other external data source. Using the debugging techniques below can help you to identify the cause of these errors.

Mutual errors

Below is a list of common errors and their causes.

Service invoked also many times: <action proper noun>

This error indicates that you have exceeded your daily quota for a given activity. For example, yous might run into this mistake if you ship too many emails in a single mean solar day. The quotas are gear up at dissimilar levels for consumer, domain, and premier accounts and are subject to modify at any time without a prior announcement by Google. You can view the quota limits for various actions in the Apps Script quota documentation.

Server non available. or Server fault occurred, please try again.

There are a few possible causes for these errors:

  • A Google server or arrangement is temporarily unavailable. Wait for a few moments and try running the script again.
  • There is an fault in your script that doesn't have a respective error bulletin. Endeavour debugging your script and see if you can isolate the problem.
  • In that location is a bug in Google Apps Script that is causing this mistake. For instructions on searching for and filing bug reports, see the Bugs. Before filing a new bug, search to run into if others have already reported it.

This error indicates that the script is lacking the authorization needed to run. When a script is run in the Script Editor or from a custom menu item an authorisation dialog is presented to the user. However, when a script is run from a trigger, embedded with a Google Sites page, or run as a service, the dialog cannot exist presented and this error is shown.

To qualify the script, open the Script Editor and run any function. The authorization prompt appears then you lot can authorize the script project. If the script contains new unauthorized services, you must re-authorize the script.

This error is frequently caused by triggers that are firing earlier the user has authorized them. If y'all don't have access to the script project (because the error is occurring for an improver yous use, for example), you can usually authorize the script by using the improver once more. If a trigger continues to fire and cause this error, you tin remove your triggers by doing the following:

New editor

  1. At the left of the Apps Script project, click Triggers .
  2. At the right of the trigger you want to remove, click More > Delete trigger.

Legacy editor

  1. Select Edit > All your triggers in the Apps Script editor. The resulting dialog shows all active triggers running on your account.
  2. Find the offending trigger in the list.
  3. Click the icon next to the trigger name to remove it.
  4. Click Salvage to record the deletion.

Yous can also remove problematic add-on triggers by uninstalling the add-on.

Access denied: DriveApp or The domain policy has disabled tertiary-party Drive apps

Administrators of Google Workspace domains have the ability to disable the Drive SDK for their domain, which prevents their users from installing and using Google Drive apps. This setting also prevents the users from being able to employ Apps Script add-ons that use the Drive service or Advanced Drive Service (even if the script was authorized prior to the admin disabling Drive SDK).

Yet, if an add-on or web app using the Drive service is published for domain-wide installation and is installed past the administrator for some or all users in the domain, the script functions for those users even if the Drive SDK is disabled in the domain.

The script does not take permission to get the active user's identity.

Indicates that the active user's identity and electronic mail are non available to the script. This warning results from a phone call to Session.getActiveUser(). It tin also consequence from a call to Session.getEffectiveUser() if the script is running in an authorization mode other than AuthMode.FULL. If this alarm is signaled, subsequent calls to User.getEmail() only render "".

There are a number of means to troubleshoot this warning, depending on the dominance mode the script is running under. The dominance manner is exposed in triggered functions as the authMode property of the e upshot parameter.

  • In AuthMode.Full, consider using Session.getEffectiveUser() instead.
  • In AuthMode.Express, ensure that the owner has authorized the script.
  • In other authority modes, avert calling either method.
  • If you are a Google Workspace customer newly experiencing this warning from an installable trigger, ensure that the trigger is running as a user inside your system.

Library is missing

If you add a popular library to your script, y'all might receive an error message stating that information technology's missing, even though the library is listed equally a dependency for your script. The reason might be that too many people are accessing the library at the same fourth dimension. To avoid this error, endeavor 1 of the post-obit solutions:

  • Copy and paste the library'southward code into your script and remove the library dependency.
  • Copy the library script and deploy information technology every bit a library from your account. Be sure to update the dependency in your original script to the new library instead of the public one.

Debugging

Not all mistakes cause an fault message to be displayed. In that location might be a more than subtle error where the code is technically correct and tin execute, simply the results are not what you expect. Here are some strategies for handling such situations and farther investigating a script that is not running the mode you expect.

Logging

While debugging it's often helpful to tape data every bit a script project executes. Google Apps Script has two methods for logging information: the Cloud logging service and the more bones Logger and console services that are congenital in to the Apps Script editor.

See the Logging guide for more details.

Error Reporting

Exceptions that occur because of runtime errors are automatically recorded using the Google Cloud Error Reporting service. This service lets y'all search and filter exception messages your script projection creates.

New editor

To access Error Reporting, see View Cloud logs and fault reports in the Google Deject Platform panel.

Legacy editor

You can enable Error Reporting the starting time fourth dimension you lot select View > Stackdriver Logging or View > Stackdriver Mistake Reporting in a new script.

Once enabled, exceptions that occur considering of runtime errors are automatically recorded using the Google Cloud Stackdriver service. This service lets you search and filter exception messages your script project creates. You tin can achieve the Stackdriver Error Reporting interface by selecting View > Stackdriver Error Reporting in the Apps Script editor.

Executions

New editor

Every fourth dimension you run a script, Apps Script makes a tape of the execution, including the Cloud logs. These records tin can help you understand which actions your script performed.

To view the executions of your script in the Apps Script project, at the left, click Executions .

Legacy editor

Every time you run a script, Apps Script makes a record of the execution, including the Deject logs. These records can help you to understand which actions your script performed. To view the executions of your script, select View > Executions in the Apps Script editor. This opens the Executions panel for the script in the Apps Script dashboard.

Checking Apps Script service condition

Although rare, sometimes specific Google Workspace services (such as Gmail or Drive) meet temporary problems that tin can pb to service outages. When this occurs, Apps Script projects that collaborate with these services may not function as expected.

You tin check if there is a Google Workspace service outage by viewing the Google Workspace Status Dashboard. If an outage is currently beingness experienced, you either wait for information technology to be resolved or seek additional assist in the Google Workspace Aid Center or the Google Workspace Known Issues documentation.

Apply the debugger and breakpoints

To locate problems in your script, yous can run it in debug way. When run in debug manner, a script pauses when information technology hits a breakpoint, which is a line you lot've highlighted in your script that you remember may have a problem. When a script pauses it displays the value of each variable at that point in fourth dimension, allowing you to audit the inner workings of a script without having to add a lot of logging statements.

Add together a breakpoint

New editor

To add a breakpoint, hover over the line number of the line you desire to add the breakpoint to. At the left of the line number, click the circle. The below epitome shows an example of a breakpoint added to a script:

Add a breakpoint

Legacy editor

To add a breakpoint click on the line number for the line you want to pause at.

Run a script in debug mode

New editor

To run the script in debug mode, at the elevation of the editor click Debug.

Before the script runs the line with the breakpoint information technology pauses and displays a tabular array of debug information. You tin can utilise this table to inspect data similar the values of parameters and the information stored in objects.

To control how the script is run, at the top of the Debugger panel, utilize the "Step in", "Step over", and "Step out" buttons. These let you run the script ane line at a time and inspect how values modify over time.

Legacy editor

To run the script in debug style, click the bug icon (Bug icon) in the toolbar. Before the script runs the line with the breakpoint information technology pauses and displays a table of debug information.

This table allows you to audit the values of the parameters like row and email, as well as the information stored in the data object. Observe that the rowData variable doesn't take a value assigned still, because the script paused before that line was executed.

When the script is paused, an extra set of buttons are displayed in the toolbar which allow you lot to control how the script is run. Using the "stride in", "step over", and "step out" buttons you tin run the script one line at a fourth dimension, allowing yous to inspect how values change over time.

Issues with multiple Google Accounts

If you're logged into multiple Google Accounts at the same time, y'all might have trouble accessing your Apps Script projects, add-ons, and spider web apps. Multi-login, or beingness logged into multiple Google Accounts at once, isn't supported for Apps Script, add together-ons, or spider web apps.

To fix issues from multi-login, try one of the following solutions:

  • Log out of all your Google Accounts and only log in to the one that has the Apps Script project, add-on, or web app you demand to access.
  • Open an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the Apps Script projection, addition, or web app you need to access.

Getting help

Debugging a problem using the tools and techniques listed above can solve a variety of bug, simply there may exist issues you run into that crave some extra help to solve. See our Support page for information on where to ask questions and file bugs.

garciaemeorms.blogspot.com

Source: https://developers.google.com/apps-script/guides/support/troubleshooting

0 Response to "Home Screen Is Temporarily Unavailable Try to Load It Again or Send an Error Report."

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel