PrismicError: An invalid API response was returned at Client.fetch


We've got a pretty major error at the moment. It appears overnight with no changes in documents, code, types etc... The prismic api seems to have gone down, which is stopping our app being build.

Here is the error in vercel. All of our pages depend on navigation bar etc which is powered by prismic. These dependancies now seem to all fail. I can't stress enough that no changes have been made anywhere.

We are using NextJs with the prismicio/client library for making our requests. sm.json all fine. No changes... anywhere. Please Help!

It appears Prismic black listed our Vercel IP! We were having hit an miss success and fail calls which were very random. Wasted a lot of dev time to figure this out..

We're experiencing the exact same issue: API calls function properly outside of Vercel but appear to break within it.

Hi we are experiencing fetch failures while building on Vercel. The Prismic status page is all green, could you please double check?

Hi @here,

I'm investigating this with the team. I'll get back to you once I know more.

I can say for certain though that we haven't blacklisted any new IPs.

Thank you for your patience.

The only reason I suggest this is because my local build started failing for the same reason. I jump on a VPN and it works! I turn the VPN off and all calls fail.

We couldn't find the errors you sent us, we tested with our own projects and the API is working on Vercel. There are no constant 50X errors on our loadbalancer; we've opened a ticket was opened on AWS to check for errors on the CloudFront Level on some edge locations, but all the APIs should normally be working.

Are you still experiencing the issue?

Hey @nathan.doore and @thorsteinn.jorundsso,

This looks like it might be related to a Next.js issue that we're investigating. Next.js with App Router on Vercel seems to have issues with data caching. We have opened an issue on the Next.js GitHub repository:

Please feel free to upvote that issue and subscribe for updates.