Hi, I'm trying to setup a nextjs 14 project with o...
# general
f
Hi, I'm trying to setup a nextjs 14 project with ory for social sign in. It seems to be working as expected when I use older versions of the client and integrations libraries.
Copy code
"@ory/client": "1.6.1",
  "@ory/integrations": "1.1.5",
But when I update to latest version to have the security audit fixes, I see the following error message
Copy code
"@ory/client": "1.9.0",
"@ory/integrations": "1.2.1",

ERROR: Unable to decode HTTP Request Body because its HTTP Header \"Content-Length\" is zero.
There are no code changes but just changing the versions seems to break things. Am I missing any recommended changes for migrating to the newer version of the integrations library ?
m
Hey @flat-student-27991 I think you should be able to remove integrations and use ory tunnel instead for local development. You dont need it for prd in any case.
f
I have the same problem. I've done just a simple version update and now the
Content-Length
error which is visible in the screenshot occurs. Do I get you right, that this could be fixed, if
@ory/integrations
is removed? Or are there any other things which needs to be changed? @flat-student-27991 did you found a solution?
m
Hard to say what the issue is without having a look at your code there @fierce-army-43735 But yes this should do the trick: https://www.ory.sh/docs/getting-started/integrate-auth/nextjs#go-to-production
f
@fierce-army-43735 we were unable to resolve it with the latest version and are looking at implementing it without the next-js integration.
f
It seems, that it is a very old problem. https://github.com/ory/integrations/issues/29 It seems that it is a very old problem. The only way to fix it until ory does it, in my opinion, is to use something like patch-package. https://github.com/ds300/patch-package
f
@fierce-army-43735 @few-napkin-57613 We have a working example here with nextjs 14 and ory kratos (thanks to @blue-carpet-85906 ) This uses just "ory/client"
158 Views