airtable.js: TypeError: Cannot read property 'offset' of undefined
It seems that if some cells are empty, the select()
method fails with the following error:
TypeError: Cannot read property 'offset' of undefined
at /node_modules/airtable/lib/query.js:109:28
at /node_modules/airtable/lib/run_action.js:70:17
This prevents all the other records to be read, so it is a pretty impacting issue. The library should just keep the empty value as an empty string or null or undefined. I.e. anything that does not crash.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 11
- Comments: 24
I’ve seen this recently. It’s probably due to an error inside of the
eachPage
function. Try wrapping that into a try/catch :Hello! You guys! This happens because the page tries to fetch the next nonexistent page, fix by:
getting the same thing on a new created DB
curl, and using fetch works without any errors so it must be something about the Airtable library, the DB contains 27 records, I’ve tried to pull 10, 20, 27, 100 but it always gives the same error. Using the
try ... catch
solution above didn’t work.had this issue too (I’m downloading over 100,000 records). I found that adding a a few hundred millisecond sleep/wait after each page solved the issue - so this might be a rate limiting thing as one of the causes