astriaai / headshots-starter

https://headshots-starter.vercel.app
MIT License
3.56k stars 575 forks source link

Webhook call failed: RequestContentLengthMismatchError #88

Closed chrisesmann closed 7 months ago

chrisesmann commented 7 months ago

After the workflow has run successfully, I get an error saying Webhook call failed: {"cause":{"name":"RequestContentLengthMismatchError","code":"UND_ERR_REQ_CONTENT_LENGTH_MISMATCH","message":"Request body length does not match content-length header"}} inside of the Leap AI dashboard logs. This is also causing endless "training" state animation in the frontend and no images rendered (even though they have been created successfully). Simply the webhook call is failing for some reason. Any idea why this could be happening?

chrisesmann commented 7 months ago

FIX: change the const webhookUrl = https://${process.env.VERCEL_URL}/leap/train-webhook; to your actual domain here. For some reason, process.env.VERCEL_URL was not working for me here. Had to manually add the domain in the code for it to work.