App error on azure deployed image
Unanswered
stefnto posted this in #help-forum
stefntoOP
I've deployed my app to azure, while having it built with output: "standalone". The login page loads, middleware is supposed to intercept requests to login page, but when I login and redirect to landing page I get a 500 internal server error and from the container logs I get this:
The odd part is that if I navigate to the login page again I get again a 500 internal error, even if the login page was working. If I clear the session, login page works again.
From what I can see the middleware stops working after a session is made?
Error: fetch failed
at context.fetch (/app/.next/standalone/node_modules/next/dist/server/web/sandbox/context.js:292:38)
at eO (/app/.next/standalone/.next/server/middleware.js:2:17647)
at Object.eR [as handler] (/app/.next/standalone/.next/server/middleware.js:2:18705)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ex (/app/.next/standalone/.next/server/middleware.js:2:15688)
at async /app/.next/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js:110:22
at async runWithTaggedErrors (/app/.next/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js:107:9)
at async NextNodeServer.runMiddleware (/app/.next/standalone/node_modules/next/dist/server/next-server.js:1062:24)
at async NextNodeServer.handleCatchallMiddlewareRequest (/app/.next/standalone/node_modules/next/dist/server/next-server.js:324:26)
at async NextNodeServer.handleRequestImpl (/app/.next/standalone/node_modules/next/dist/server/base-server.js:822:28) {
cause: [Error: 0058564945770000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
] {
library: 'SSL routines',
reason: 'wrong version number',
code: 'ERR_SSL_WRONG_VERSION_NUMBER'
}
}The odd part is that if I navigate to the login page again I get again a 500 internal error, even if the login page was working. If I clear the session, login page works again.
From what I can see the middleware stops working after a session is made?
1 Reply
stefntoOP
I also get the log
Unable to find `next-intl` locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. The `notFound()` function will be called as a result. to backup that the middleware stops working. I removed the middleware to see if the app worked without it and I stopped getting the 500 internal error and the redirect to landing page completes. Any ideas what might be causing the error?