0
votes

I've create a spreadsheet with a script for copy some other spreadsheet with a script inside, this worked fine for a moment.

But for several days all my scripts, on all news spreadsheets copied, they doesn't worked and they blocked when a complex line come (For example : DriveApp.getFileById(id))

(I say complex for script when onEdit, onOpen or other function can't run the line)

After somes researchs and reflexions, I think the problem come from the settings of my domain (G Suit), because when I use a new spreadsheet's script on an other account, they doesn't work, but if I use my old spreadsheet's scripts, they does work fine. I'm not sure.

The error messages I receive (it's when the script is out of time) are : - An error has occurred on the server. We apologize and invite you to try again later. - Exceeded authorized execution time

I've tried to create a new spreadsheet and rewrite the script manually but I got the same error.

I'm not sure if it's only my domain, probably Google got some error too (But after 5 days it's strange).

Please, someone can help me, for say me if it's a problem with google, my domain or any other way.

(Sorry for my bad english)

Thanks in advance

1
There have been many users reporting unexpected errors with DriveApp.getFileById and related functions. They just run without end and then timeout. The errors you see might be due to that, or as you said, to G Suite domain policies. You can try DriveApp.getRootFolder() and then see the execution transcript. If the command takes a large amount of time then the error is on Google ! - Rodrigo Chiong
Thanks you for you answer Rodrigo Chiong, I tried to use DriveApp.getRootFolder() but he didn't work too :( - Arnaud Gillon
No worries Arnaud. Are you still facing this issue? Google fixed the issue on OCt. 4 according to this bug on the Google Issue Tracker: issuetracker.google.com/issues/67054694 It's working fine on my account since that day. If it's still not working it might be something else ! - Rodrigo Chiong

1 Answers

0
votes

Check the answer I've provided here.

You'll just have to enable Drive API for the project and from the Google Dev console.