HTTP POST request to /api throw "Error: Unexpected end of form" at Multipart._final #5969
Replies: 2 comments 1 reply
-
It appears that it might be linked to the Firebase Functions (i.e. Cloud Run) environment itself: |
Beta Was this translation helpful? Give feedback.
-
Hey @PavelGolodoniuc — good find. I am not aware of anyone in our community successfully deploying to Firebase Functions, but it sounds like there might not be much we can do to fix this. However, I do think that from your Stack Overflow responses, it seems like Multer is incompatible with Firebase Functions, and Busboy is not. In 3.x, we are removing our reliance on Multer and just using Busboy itself. So your issue may actually be fixed on 3.x. In the meantime, I will convert this to a discussion so others can find it. Let us know how you get on! |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
No response
Describe the Bug
When Payload is deployed into GCP Cloud Run as a Firebase Function, the
/api/users/login
POST request, and by extension the login form on the Admin UI, fail with the following error:Other API methods seem to work fine, e.g.,
/api/users/init
returns:Two days of searching resulted in many reports of the same issue, which seems to be linked to the
express-fileupload
and/orbusboy
packages. For example, see expressjs/multer#1144. None of the recommendations worked, either.Locally, everything works fine.
To Reproduce
Deploy the Payload e-commerce template as a Cloud Run function into GCP and connect to a GCP-hosted Mongo Atlas cluster.
Dependencies:
Cloud Run environment:
node: 20
Region: us-central1
Memory allocated: 256 MiB
CPU: 1
Payload Version
2.12.1
Adapters and Plugins
bundler-webpack, db-mongodb, richtext-slate
Beta Was this translation helpful? Give feedback.
All reactions