Nuxt ServerError: An invalid response was received from the upstream server
I’m receiving this error message when trying to generate my Nuxt app – nothing has changed in this repo and no such problems are being experieced with Sanity projects on this account.
│ ✖ Nuxt Fatal Error │ ServerError: An invalid response was received from the upstream server
I'm getting the same, since an hour or so ago
ah OK! amazing (in that its not just me…) –
Different stack, this is from a Node cloud function in AWS using the Sanity client library
It’s a bit hard to tell without more debugging info? Can you get hold of the networking requests?
The error was generated for me by fetch requests using the Sanity JS client (v0.147.3) with the following code as an example that triggered it (intermittently).
const result = await client.fetch(query, { id, since }) .catch((error) => { console.error('Request failed:', error.message) })
Request failed: An invalid response was received from the upstream server
fgxigzm8at
2020-09-14T15:20:19.080Z
It looks like the error was probably sent by a proxy server at Sanity's end, that's what the message (and Google) would seem to suggest.
Hi Simon and Chris, we’ll start looking into this. Thanks for the detailed reporting. Just found the same error in our logs for your project.
Let’s see if we can figure out where this is coming from
🕵️♀️
Great, thanks 🙂
Thanks
45bzdam9
An invalid response was received from the upstream server 17:01:55 UTC at onResponse (node_modules/@sanity/client/lib/http/request.js:19:13) at node_modules/@sanity/client/node_modules/get-it/lib-node/util/middlewareReducer.js:10:22 at Array.reduce (<anonymous>) at applyMiddleware (node_modules/@sanity/client/node_modules/get-it/lib-node/util/middlewareReducer.js:9:29) at onResponse (node_modules/@sanity/client/node_modules/get-it/lib-node/index.js:81:22) at node_modules/@sanity/client/node_modules/get-it/lib-node/index.js:48:55
Thanks
45bzdam9
An invalid response was received from the upstream server 17:01:55 UTC at onResponse (node_modules/@sanity/client/lib/http/request.js:19:13) at node_modules/@sanity/client/node_modules/get-it/lib-node/util/middlewareReducer.js:10:22 at Array.reduce (<anonymous>) at applyMiddleware (node_modules/@sanity/client/node_modules/get-it/lib-node/util/middlewareReducer.js:9:29) at onResponse (node_modules/@sanity/client/node_modules/get-it/lib-node/index.js:81:22) at node_modules/@sanity/client/node_modules/get-it/lib-node/index.js:48:55
Thanks Simon! Are you consistently getting these errors or is it hit and miss when trying to generate the Nuxt app?
I’m not sure if it’s all documents (sorry!), it seems like it isn’t if every single one is definitely being logged – but it’s a very large number, of all types, which causes the build to fail
Looks like it was a temporary hiccup around the times you reported the server errors. Things should be back to functioning properly for a while already, but please let me know if this is not the case for any of your projects.
Yep, everything back to normal now, thanks. It was day 6 of a big client project being live in production, having sung the praises of Sanity to them throughout the build, so it was a bit frustrating it started getting errors and have to explain to the client after handling a lot of traffic well over the weekend for us.
Thank you for responding so quickly and investigating, we all know problems happen in tech sometimes, and it's the customer service that counts when they do. It was great that you
Hi Chris, glad things have gone back to normal. I’m sorry this happened right after launching a large project - definitely frustrating after all the hard work you put in. Thanks for bearing with us. And thank you for singing those praises 🙌 We’ll do our best to avoid future hiccups like this one.
2020-09-15T09:10:51.060Z
Looks like we did - very sorry about this. I’ll ping the operations team and we’ll start looking into this.
Thanks 🙂
Status updates to track: https://status.sanity.io/incidents/n714zmgzlb6z
Things should be much better since around 10 minutes ago
Yes, no more errors in our logs. I'll keep an eye on it all, but hopefully sorted now. Thanks
20 seconds after I replied, in a different project
ko2r7n3evia the CDN we hit a similar error!
2020-09-15T09:59:58.237Zwe got a 502 Bad Gateway.
Was that a single occurrence is it still happening? Things seem stable from what I can see but it might be project-specific in this case.
We had the CDN one it just twice, 10 seconds apart, so it could have just been a blip. Certainly much fewer cases of error occurring. Now onto the fact Netlify is down, which you probably can't help me with!
Sorry to hear. Heavy weather all around it seems, but it looks like they’re implementing a fix: https://www.netlifystatus.com/
Sanity.io: Get the most out of your content
Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.
Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.