Automations randomly fail with "unknown error"

Has anyone else run into this? I have several automations set up on my base, and a week or two ago some of the automations using the Run a script action started randomly failing with the error message An unknown error occurred. When I look at the log, it just says ERROR: There was an unexpected error while executing your script.

I haven’t found any way to fix it aside from just re-triggering the automation on whatever records weren’t processed.

1 Like

I’ve only run into that error while testing, not after an automation has been running for a while. Obviously there’s no way of knowing how to fix it without a more detailed error message, so it could be anything, and off the top of my head I can’t recall what the fix was when I’ve hit that error myself.

1 Like

Yeah, the lack of a detailed error message is very frustrating!

I receive the same thing a few times a day. I started noticing it happening a couple days ago. Wish I had more to add than just “me too”, but there it is…

1 Like

Hi all!

Erin with Airtable support here :wave:

Thanks @Matthew_Lount for writing in about this and helping us pinpoint the source of some of these error messages. In this case, we noticed that some scripts were occasionally hitting timeouts and failing with this “unexpected error” message. The team is currently working on both increasing those timeouts so this occurs much less frequently, as well as improving the error messages that are surfaced so that when a script fails, you’ll have a better idea of what exactly went wrong. Thanks again for bringing this to our attention, and as always feel free to write into us directly at support@airtable.com if there are any other issues you encounter.

3 Likes

Hi @Erin_OHern, how are these timeouts related to the “CPU time” and “Run Time” displayed in the Automation Script Editor? The scripts that are failing on me don’t come anywhere close to those caps, they’re under 10% in both metrics.

Hi @Tim_Mackey. Looking over the advice @Erin_OHern gave me it sounds like it is not the overall usage, but the individual calls to Airtable functions that can time out.

Her suggestions were basically to reduce the load of any individual call to get records from the base to just what I need (such as by passing in specific fields that I need, empty lists of fields if I’m just looking for the name and /or id portion of the records). I expect that reducing numbers of records by choosing appropriate views would also be helpful.

@Erin_OHern feel free to correct me if I’ve misinterpreted your advice. :slight_smile:

1 Like

Thanks @Matthew_Lount, that makes sense. I suspected it might be something like this, which is why I’ve already made some changes to my scripts like the ones you mentioned (limiting fields). I’m working with several tables with a huge number of linked cells, so I suspect that is where the problem is arising. Without an informative error message though, and given the fact that the scripts normally complete in a short amount of time, there wasn’t enough evidence for me to assume that this was the problem.

@Tim_Mackey No worries - I’m in a similar boat - hopefully their suggestions help cut down on the failed calls. :slight_smile: