-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected end of form at Multipart._final #362
Comments
I'm not familiar with Google Cloud Run, but maybe this issue is relevant: This comment generally applies for both the Google Cloud Functions and AWS Lambda issues: Just googling quickly, it seems Google Cloud run has a request size limit of 32 MB: https://cloud.google.com/run/quotas So, maybe it's cutting your requests off early if you are exceeding that? |
Hey @jaydenseric Thank you for your response! I should clarify my problem as I'm more clear as to what may be going wrong. I have two express servers. The first one intercepts all requests from the Frontend prior to passing the request to the backend. Locally, this first express server isn't in use and is only in use when deployed. This is where the issue is happening and hence the difference between local and deployed. The issue is definitely happening in this client-side express server as I have graphqlUpload implemented in my backend server and without the client-side one this whole flow works perfectly. How do you suggest passing this multipart form from one express server to another? I've tried to use graphqlUploadExpress middleware in my client-side express server but it still doesn't work. Do I have to use multer here? Here's a flow chart of when it is working:
This Flow works Here's a flow chart of when its not working It errors out at the Express Server. Confused as to why this extra Express layer is causing "Unexpected End of Form at Multipart._final" errors from busboy. Any ideas would be appreciated here |
The problem of forwarding a GraphQL multipart request (or just part of a request) from one server to another is a well known, and in many cases a solved, problem that's particularly relevant for federated GraphQL API proxies/gateways that stitch together over HTTP multiple GraphQL APIs. This issue for example relates to that: #194 . In your case, you might not need to do anything particularly complicated if you don't need to deconstruct the GraphQL request and only forward parts of it to other servers responsible for fulfilling those individual parts; you might be able to somehow pass through the entire multipart request stream without much effort. It's not something I've done before though, so I'm not sure exactly the best way to tackle it. Helping out further with this is really beyond the scope of maintaining this package because it's more about setting up your particular server infrastructure. Feel free to share the final solution you come up with here, in case it helps others with a similar question. |
Greetings!
Any help here would be appreciated...
Super strange issue here. I have a React/Node.js application paired with Apollo GraphQL and Express.
I've implemented
graphql-upload
in addition toapollo-upload-client
in the frontend to be able to upload files such as CSVs to Google Cloud Storage.When developing locally, everything works just fine. I'm able to select the file to upload and stream it up to GCS.
However, once I deployed my changes via Google Cloud Run, I started getting this error:
This error is only occurring when deployed on GCP.
Any ideas as to why this could be happening?
Node Version: 14.20.1
apollo-upload-client: ^17.0.0
graphql-upload: ^16.0.2
apollo-server-express: ~2.14.3
express: ~4.17.1
graphql: ~15.5.0
The text was updated successfully, but these errors were encountered: