🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

GraphQL API fetch errors linked to backend update rollback

22 replies
Last updated: May 17, 2024
Hey, I'm getting the following error when trying to fetch data from the GraphQL API. It started erroring 2 days ago. Could this be related to the infrastructure update (https://www.sanity-status.com/ )? If so, when can we expect it to start working again?

 TypeError: terminated
     at Fetch.onAborted (node:internal/deps/undici/undici:10916:53)
     at Fetch.emit (node:events:518:28)
     at Fetch.emit (node:domain:488:12)
     at Fetch.terminate (node:internal/deps/undici/undici:10102:14)
     at Object.onError (node:internal/deps/undici/undici:11034:38)
     at Request.onError (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:103010)
     at errorRequest (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:83029)
     at TLSSocket.onSocketClose (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:70729)
     at TLSSocket.emit (node:events:530:35)
     at TLSSocket.emit (node:domain:488:12) {
   [cause]: SocketError: other side closed
       at TLSSocket.onSocketEnd (/Users/<redacted>/node_modules/next/dist/compiled/undici/index.js:1:70251)
       at TLSSocket.emit (node:events:530:35)
       at TLSSocket.emit (node:domain:488:12)
       at endReadableNT (node:internal/streams/readable:1696:12)
       at processTicksAndRejections (node:internal/process/task_queues:82:21) {
     code: 'UND_ERR_SOCKET',
     socket: {
       localAddress: '192.168.88.182',
       localPort: 64602,
       remoteAddress: '34.111.181.219',
       remotePort: 443,
       remoteFamily: 'IPv4',
       timeout: undefined,
       bytesWritten: 3422,
       bytesRead: 73206
     }
   }
 }
May 15, 2024, 12:23 PM
I have the same issue!
May 15, 2024, 12:25 PM
Is this happening any time you fetch data or only on certain occasions?
May 15, 2024, 4:44 PM
It definitely happens everytime when fetching the introspection schema, didn’t really check other queries as I can’t run the app because of this error
May 15, 2024, 5:14 PM
Weird thing is that it doesn’t happen in the playground
May 15, 2024, 5:14 PM
It started on Monday, but then a restart of the app used to help, since today it happens every time
May 15, 2024, 5:18 PM
It started failing on production as well, it has been deployed a week ago, so it can’t be a change that I made that broke it. The errors begun appearing in Sentry yesterday
May 15, 2024, 5:19 PM
user D
what are you seeing for your case?
May 15, 2024, 10:03 PM
If either of you
user H
or
user D
are around and available, can you see if you are still able to reproduce this issue?
May 15, 2024, 10:51 PM
user Y
The issue is gone, thank you!
May 16, 2024, 5:26 AM
user Y
Actually it just reappeared, it happened once and when I re-run the app it was gone. I'm debugging re-renders in my app, so I've been refreshing it a lot, could this be somehow related to rate limiting? I might have sent a lot of requests since I'm using
webpack-val-loader
to prefetch some data (happens on every build cycle)
May 16, 2024, 5:56 AM
Thanks for confirming,
user H
- sorry to hear the issue came back for you. We’ll take this back to the backend team and will keep you posted on any updates.
May 16, 2024, 6:05 AM
user Y
I saw the exact same message - but it’s working now
May 16, 2024, 7:26 AM
user H
- would you mind sharing your project ID and a failing query to the GraphQL API in a DM? This would help the team run a more specific test to see why you might still be seeing errors.
May 16, 2024, 9:48 AM
user Y
I’ve just got the error again
May 16, 2024, 9:49 AM
Yeah, it's breaking the pipelines again
May 16, 2024, 9:51 AM
user D
sorry to hear the issue returned for you - could you also share your project ID and the failing query in a DM?
May 16, 2024, 9:51 AM
user H
user D
we've rolled back a backend update that's tied to the issue, which means you should no longer see the errors now. Please let me know if this doesn't match your experience. Sorry for the impact this had on your deployments.
May 16, 2024, 11:39 AM
user M
Thanks, the builds seem to be passing now, will let you know if it happenes again
May 16, 2024, 11:53 AM
We are back in my timezone moreso now as a heads up (thanks for jumping in Peter). Wasn’t ignoring your messages earlier
user D
/
user H
. Glad to ehar things are working!
May 16, 2024, 4:06 PM
user H
when you can will you please note your ProjectID here (or DM it to me if you feel more comfortable)? Thank you.
May 16, 2024, 5:04 PM
user Y
Me and
user D
are actually working on the same project, so you can use the projectId he sent to
user M
May 17, 2024, 6:52 AM
Ah that explains - thanks for confirming
user H
🙂
May 17, 2024, 6:55 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?