Help

Re: remoteFetchAsync not working

Solved
Jump to Solution
5701 1
cancel
Showing results for 
Search instead for 
Did you mean: 
wheels_2go
4 - Data Explorer
4 - Data Explorer

Today any script that I was using remoteFetchAsync (to avoid CORS errors) is giving me this error:

 j: Error: Bad request: <root>.requestJson is missing

This error comes up on a few requests to different unrelated APIs. Additionally, some which work using regular fetch give this error when using remoteFetchAsync.

These scripts were working fine until now. Any ideas?

46 Replies 46
wat2win
5 - Automation Enthusiast
5 - Automation Enthusiast

Same here business cirtical issue

hi @wheels_2go ,
I also encountered this issue a few hours ago. I solved it by replacing the name of the function, changing it from remoteFetchAsync to fetch. I believe that Airtable made a change, aligning the fetch function in the automations, with the same function on extensions (they used to have two different names with the extensions one being remoteFetchAsync, now they are both called fetch). Hope this helps!

Website: alessiomonino.com
Calendly: https://alessiomonino.com/contact
Email: alessio.monino@gmail.com

@Alessio_Monino, I don't believe Airtable has made a change yet. The automations are able to use fetch because they don't have CORS restrictions.

That said, confirming that moving my extension code to an automation script, replacing remoteFetchAsync with fetch, plus removing references to session (since automations don't have access), temporarily resolved this issue for me as well.

Bryan_Stafford
5 - Automation Enthusiast
5 - Automation Enthusiast

Definitely is linked to a recent update on the Airtable side. The reply I got was super vague though, and this has brought several of our bases to a screeching halt.

renzo-rv
4 - Data Explorer
4 - Data Explorer

Same issue here., critical problem for us too, remoteFetchAsync() fails when called from Extension script.

I temporarily fixed using "fetch" instead, but I concern it can cause CORS issue.

Amocat_Staff
5 - Automation Enthusiast
5 - Automation Enthusiast

Not savvy over here, how would I implement this fetch fix with the Sendgrid extension?

You can’t implement the fix with the extension as you cannot modify how the extension is making its calls. We send transactional email thru send gris out of Airtable all the time and they’re always done via automaton - if you tell me a little more about what you’re trying to send I might be able to help.

Is this a marketing campaign or just a dynamic template with some fields from your base merged in?

Amocat_Staff
5 - Automation Enthusiast
5 - Automation Enthusiast

Oh that might be a good solution - it's just the basic sendgrid template with fields. 

I'll try the automated send email function for now to get the emails out. 

Because this is so widespread, would it be possible to make this visible on the Airtable Status page? (status.airtable.com)
This is something many of us are paying attention to and is practically "system down" in our particular situation.

No, I mean that I use a script step in an automation to do what you're describing through SendGrid - the send email automation step has really severe limits and will more than likely not work for your use case. You'll have to construct the send call with fetch() (which should work) and match it to your template. Can you send me a list of your template variables? I'll adapt my function to include your variables and give you some notes on how to complete the setup if you'd like.