I have a script that takes a Google spreadsheet writes the text to a Google Doc. When I try to run the function, I get the message in red at the top of the page Service unavailable: Docs (Dismiss). This is new. What does this error mean? Thanks!
In addition to #Pierre-Marie Richard's answer, the error Service unavailable: Docs usually happens when you are using an invalid Doc ID.
This happens to me when appending a paragraph element to a document, if the paragraph element contains an image. I think it's related to either of the following bugs:
https://issuetracker.google.com/issues/142533361
https://issuetracker.google.com/issues/117212337
As mentioned in the documentation :
Server not available.
Server error occurred, please try again.
There are a couple possible causes for this error:
A Google server or system is temporarily unavailable. Wait for a few moments and try running the script again.
There is an error in your script that doesn't have a corresponding error message. Try debugging your script and see if you can isolate the problem.
There is a bug in Google Apps Script that is causing this error. Report the error on the issue tracker.
Related
This question already has answers here:
Simple function suddenly throws "An unknown error has occurred, please try again later"
(3 answers)
Closed 7 months ago.
We have a google apps script that runs on google sheets as a macro.
We have maybe a dozen scripts all which have been executing without issue. Suddenly today we are getting the following error on every script:
"Script (NAME OF THE SCRIPT HERE) experienced an error"
The details link doesn't provide any extra detail.
If I open and attempt to run the script in the classic editor, I get the following error.
We're sorry, there was an unexpected error while creating the Cloud
Platform project. Error code DEADLINE_EXCEEDED.
Even when I update the funciton to me empty, such this:
function dropdownmenu(){
return
}
We are getting the same error.
Is there an unposted outage with google cloud services/app scripts? What could have possibly changed in our environment?
I should note, we have already tried changing the runtime version on our script:
How to avoid DEADLINE_EXCEEDED when "We're sorry, a server error occurred. Please wait a bit and try again." happens?
It seems there is an outage with Google Apps Script that may be affecting you, there are people reporting the same issue even when running simple functions in Apps Script, you can see Google's public issue tracker for more details.
There are some users that are reporting that the issue started to fix itself, try clearing cache and cookies in your browser and hopefully the issue gets fixed soon.
UPDATE: Based on comments in the issue tracker, adding your script ID to the Library might work too. To get the script ID, go to the menu on the left, go to "Project Settings", copy the script ID, go back to "Editor", click the plus icon next to "Libraries" and add the script ID.
I have a Google Apps Script that works fine for most (>95%) of the time.
The script is bound to a Google Form and is set to be run on the 'On
Form Submit' event.
The script has a try-catch block.
This block catches an exception once in a while - Service timed out:
Spreadsheets.
There is no pattern to when this occurs. It is random.
Just to clarify. The script DOES NOT time out and IT DOES finish running as expected.
But, on random occasions, the script does not do it's job because of the "Service timed out: Spreadsheets" exception that is thrown when the script tries to write to a Google Spreadsheet.
Is there any way I can figure out what's the root cause of this? And is there anyway I can get some support for this issue?
I tried contacting Google Workspace support and they directed me here to SO to see if I can get some help.
You are most likely hitting one of the limitations of Apps Script. Perhaps you should time the function and try to optimize your code.
I was following this step-by-step about File Dialogs from Google developers Apps Script pages to insert a Google file picker dialog window into my add-on but I keep facing the same error:
ScriptError: Exception: We're sorry, a server error occurred. Please wait a bit and try again.
I have triple-checked all the steps, key, credentials, scopes in the manifest, and so on and the issue persists. I even looked into this video for some light. No need to say I waited "a bit" and tried countless times. What else might be causing this problem?
I had a similar issue with the file picker and also used the guide on the google homepage.
Try to call "DriveApp.getFileById(). If that results in the same error message, the method below should work.
There seems to be a bug within Google Apps script. You have to enable "Google Drive API" in your Google Cloud Platform Project. Then start the File Picker. Afterwards you may disable "Google Drive API" again.
For more information see StackOverflow, that's where I found the method.
I have the following Google App Script. Can set breakpoints but they are never hit. I am running in Script editor with Calendar API enabled. It is deployed as an API executable. I have other following but it was removed to make it as simple as possible.
function listCalendars() {
calendars = CalendarApp.getAllCalendars();
}
Try to comment the line, where it is pointing out and check if the error is really with this function or not. You can also use debugger and execution transcript to figure out the issue. Also try to search it here. I saw many ticket issue about your problem.
Every morning I get an email from Apps Script saying this:
Summary of failures for Google Apps Script: Not found‏
Your script, Not found, has recently failed to finish successfully. A
summary of the failure(s) is shown below. To configure the triggers
for this script, or change your setting for receiving future failure
notifications, click here.
When I click the link in the email, it tries fetching the triggers but returns another error:
We're sorry, a server error occurred. Please wait a bit and try
again.Dismiss
How do I get rid of these messages?
There is a topic about this problem on the GAS issue tracker. Please star it to promote it to the support.
How do I get rid of these messages?
Now a solution is to filter such messages in your email system or to wait when the GAS teams fixes it.