Help

Re: "No table with ID" error when calling createTableAsync()

1337 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_Kaminski
5 - Automation Enthusiast
5 - Automation Enthusiast

I’ve got a Scripting app script that uses createTableAsync(), and it’s been working fine for months.

Today when I run it, I get an error of the form:

j: No table with ID tblPJSEYaC7kb5yIF in base ‘Untitled Base’
at main on line 1

The following script demonstrates the error. It has just one line, taken from the createTableAsync() documentation:

const tableId = await base.createTableAsync("Tasks", [{name: "Title", type: "singleLineText"}]);

I expect that this line would execute without an error, and tableId would end up with the ID of the created table. Instead, the Scripting app stops with an error message in the console, halting the script prematurely. (The table is created, for what it’s worth, but the script stops and does not complete the rest of the operations.)

Why have I started getting this error with createTableAsync()? Is there a way I can fix it? Or can Airtable fix it?

3 Replies 3
Sachin_Aggarwal
4 - Data Explorer
4 - Data Explorer

We are also facing the same issue from today itself. Also, base.tables is not getting updated after deleting the table. The table just deleted still comes up in base.tables and only goes away after reopening the base.

Peter_Kaminski
5 - Automation Enthusiast
5 - Automation Enthusiast

I worked around the createTableAsync() problem by creating the table by hand, and using getTable() instead.

I now get a similar error in the next operation, for createFieldAsync():

j: No field with ID fldpm0N2nuuQpMKJQ in table 'Tasks'
    at main on line 2

Here is a script that demonstrates the error, taken from the createFieldAsync() documentation:

const table = base.getTable("Tasks");
const fieldId = await table.createFieldAsync("Notes", "multilineText");

I expect that this line would execute without an error, and fieldId would end up with the ID of the created field. Instead, the Scripting app stops with an error message in the console, halting the script prematurely.

Why have I started getting this error with createFieldAsync()? Is there a way I can fix it? Or can Airtable fix it?

To describe the scope of the problem, my production script calls createTableAsync() 9 times, and it calls createFieldAsync() 72 times. I run the script many times during a dev day. It’s not practical for me to do all the operations by hand. This is a significant blocker to my Airtable development.

Peter_Kaminski
5 - Automation Enthusiast
5 - Automation Enthusiast

Airtable Support suggested a workaround that may help until there’s a fix: use a try/catch block around createTableAsync() and createFieldAsync(). It’s been good enough to get me unstuck.

The tables and fields are created, and the try/catch block can ignore the error. They don’t show up in base.tables or table.fields until a refresh, but maybe by splitting up the script you can work around that.