Basj
Basj

Reputation: 46423

How to avoid DEADLINE_EXCEEDED when "We're sorry, a server error occurred. Please wait a bit and try again." happens?

I have read similar questions such as Error type of "We're sorry, a server error occurred. Please wait a bit and try again. " and many others, but they were specific to other types of error.


I have a Google Apps Script running and processing Gmail emails with a minute timer.

Each day I receive logs by email with We're sorry, a server error occurred. Please wait a bit and try again. (see screenshot #1 below). The problem is that:

How to avoid this DEADLINE_EXCEEDED error even if my script had did nothing at the time of the failure? Or at least how to avoid receiving notifications each day about this?

enter image description here

enter image description here

Upvotes: 6

Views: 3740

Answers (1)

Jose Vasquez
Jose Vasquez

Reputation: 1728

Answer

As I can see this a specific error which occurs when you are using the V8 Runtime. Given the information provided you can avoid these errors by using Rhino Runtime. This is not the ideal workaround but there's not more information to debug.

Change to Rhino Runtime

Edit your manifest file appscript.json (if you are using the new script editor go to Project Settings > mark Show "appsscript.json" manifest file in editor) and change the runtimeVersion to STABLE or DEPRECATED_ES5 which means "change it to Rhino".

If the error persists

In this case it's probably an issue in Google Apps Scripts and you should post it on the Google Issue Tracker as recommended.

Reference

Manifests

Manifest structure

Upvotes: -1

Related Questions