Hi, I got an error while trying to reset password ...
# support-questions-legacy
i
Hi, I got an error while trying to reset password for a user. It happens only when user clicks "Change Passoword" after inputing New password and Confirm password.
Copy code
TypeError: Body is unusable
at specConsumeBody (node:internal/deps/undici/undici:6630:15)
at NextRequest.json (node:internal/deps/undici/undici:6533:18)
at Object.getJSONBody (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/nextjs.js:71:38)
at PreParsedRequest.getJSONBody (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/framework/custom/framework.js:45:33)
at Object.passwordReset [as default] (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/recipe/emailpassword/api/passwordReset.js:36:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Recipe.handleAPIRequest (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/recipe/emailpassword/recipe.js:95:24)
at async Recipe.handleAPIRequest (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/recipe/thirdpartyemailpassword/recipe.js:49:24)
at async SuperTokens.middleware (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/supertokens.js:160:38)
at async eval (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/framework/custom/framework.js:134:28)
at async handleCall (webpack-internal:///(rsc)/./node_modules/.pnpm/supertokens-node@16.5.1/node_modules/supertokens-node/lib/build/nextjs.js:76:40)
at async /Users/path-to-project/node_modules/.pnpm/next@14.0.3_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:62609
r
hey @iamalvisng
i
👋
r
are there any customisations related to the password reset flwo on your end?
i
No customization for password reset so far.
r
hmm
have you tried our demo app using
npx create-supertokens-app@latest
with nextjs and see if the flow works in that?
i
I can take a look at that, but what I have now pretty much follows the documented guide for Next.js.
r
yeaaa. Thats fair. Im not sure why this error would happen. If you can reproduce it in the demo app, that would really help us figure it out
If not, then we know that something specific to your app setup is the issue and we can see from there
i
Sure
I managed to reproduce the error via the demo app
npx create-supertokens-app@latest
The reproducible steps are the same.
r
ok. Let me try
we will fix it! thanks for the heads up
i
Thanks.
r
if you like, you could open an issue, so you can keep track of the fix
i
In the react repo?
r
in the node repo
i
Sure
i
r
thanks!
i
No problem
20 Views