How to handle errors

This page describes what to do if an error occurs.
1. Find solutions based on error messages
2. Find solutions based on the situation

1. Find solutions based on the situation

Error messages appear in red text in the log history. You can find the cause and solution by clicking on this error message.
Error message Cause Solution
Google authorized error This error occurs when you try to use Google services, including Sheets or Google Drive, without linking your Google account. Refer to the Connect with Google account page and follow the instructions to connect with your Google account.
Error: id is required in SpreadsheetApp.openById This error occurs when the Google Sheets ID is not specified. Refer to the How to find the spreadsheet ID and specify the ID obtained here within the script.
Error: An error has occurred in sending the email. Please check the Yahoo! JAPAN Business ID you specified.: MailApp.sendEmail This error occurs when the Business ID you specified as the email recipient does not have access to the ad account you are using. Specify a Business ID with access to the ad account you use as the email recipient.
Error: errorCode: "240003", message: "Invalid Filters Item." This error occurs when you specify a filter item that does not match any item in the fields for reports. To use them as report filters, enter them in the fields.
Error: errorCode: "0112", message: "Account not found." This error occurs when you run a Display Ads script with a Search Ads account or a Search Ads script with a Display Ads account. Run the script with the matching account (Search Ads or Display Ads).
script is aborted This error occurs only when you or someone else clicks the stop button on the history view, indicating that it occurs when the script is stopped manually. Try again.
System error occurred. It may exceed the size of the data that can be processed. Please check processing data size. This error indicates a memory overflow that occurs when processing a large amount of data (for example: report data with approximately 40,000 rows). Fix the script to retrieve less data at a time. (For reports, use filters to reduce the number of results, etc.)
ReferenceError: main is not defined This error occurs because the script does not have a main function. Yahoo! JAPAN Ads Scripts, like JavaScript, will not run without a main function. Make sure to call the functions you want to use in the main function. Make sure to call the functions you want to use in the main function.
Exceeded maximum execution time The limit of the run time for the script is 10 minutes. If the process exceeds 10 minutes, an error will occur, forcing the script to stop. Fix the script to reduce the processing time.
Example: Specify a filter in a report to reduce the number of rows retrieved.
Exceeded maximum log length The upper limit for a script log* that you can output within a script is 100 KB. This error occurs if the log output is 100 KB or larger. The script will not force a stop and will run until it completes.
*100 KB = 51,200 characters →Assuming 50 characters per line, the data volume is approximately 1,024 lines.
*Example of script description: Logger.log('Log output content');
If no other errors appear, the script has completed running, and no further action is necessary.
If errors bother you, try reducing the log output.

2. Find solutions based on the phenomenon

If you do not see error messages or are not sure about the error, refer to this section.
Question Cause Approach
I am encountering an authentication error (Yahoo! JAPAN Ads authentication error) with my account, which previously ran the script successfully. Why? The error is most likely caused by one of the following reasons:
1. The linkage between your Yahoo! Japan Business ID and Yahoo! Japan ID has been removed
2. Access to the Yahoo! Japan Business ID has changed
3. Authentication has been removed from the list of accessible applications
1. The linkage between your Yahoo! Japan Business ID and Yahoo! Japan ID has been removed
Link your Yahoo! Japan Business ID with your Yahoo! Japan ID again.

2. Access to the Yahoo! Japan Business ID has changed
Take one of the following actions:
・Give the Yahoo! Japan Business ID access to the relevant ad account
・Set up run/frequency using another Yahoo! Japan Business ID that has access to the relevant ad account

3. Authentication has been removed from the list of accessible applications
Set up run/frequency using Yahoo! Japan Business ID signed in
I pasted the "sample program" of the Yahoo! JAPAN Ads Script as is, but I got an error. Why? This error occurs because the script does not have a main function. Yahoo! JAPAN Ads Scripts, like JavaScript, will not run without a main function. Make sure to call other functions from the main function.
When I try to get weather information using the Yahoo! JAPAN Ads Scripts, I cannot get the data properly, even though I specify the city or town name. Why? You can't retrieve the data if you specify the city or town incorrectly. Check that the city, town, or village is specified as "Prefecture name (half-width space) city, town, or village name."
The file size limit for Yahoo! JAPAN Ads Scripts is 20 MB, but an error occurs when I download or upload multiple times. What should I do? An error may occur if you request a file with a 20 MB file multiple times. We recommend handling files of less than approximately 5 MB per request when processing multiple requests.
When I clicked the "Sign in with Google" button after implementing an external tool connection (Google account), an authentication error occurred, indicating that access was blocked. The Yahoo! JAPAN Ads Script may be blocked due to user settings. Remove access restrictions to Yahoo! JAPAN Ads Script in the Google account you are trying to connect, and then connect your Google account again.
*The information we provide regarding how Google handles access is for reference only.