✓ Starting...
✓ Ready in 909ms
✓ Compiled /middleware in 58ms
✓ Compiled (307 modules)
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
○ Compiling /_not-found ...
✓ Compiled /_not-found in 1714ms (877 modules)
GET /login 404 in 3ms
GET / 404 in 3ms
GET /_next/static/webpack/a480f6292504d7ae.webpack.hot-update.json 404 in 1539ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
✓ Compiled in 199ms (845 modules)
GET / 404 in 1ms
⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
GET /_next/static/webpack/a480f6292504d7ae.webpack.hot-update.json 404 in 225ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 6ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
How to reproduce
Just Cant start the app at all after adding authentication.
I get TypeError: Cannot read properties of undefined (reading 'substring')
at (file:///Users/anandl/projects/chatty/rev/node_modules/oidc-token-hash/lib/shake256.js:3)
at eval (webpack-internal:///(middleware)/./node_modules/oidc-token-hash/lib/shake256.js:3:40)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (file:///Users/anandl/projects/chatty/rev/.next/server/middleware.js:1500:1)
at webpack_require (file:///Users/anandl/projects/chatty/rev/.next/server/edge-runtime-webpack.js:37:33)
at fn (file:///Users/anandl/projects/chatty/rev/.next/server/edge-runtime-webpack.js:273:21)
at eval (webpack-internal:///(middleware)/./node_modules/oidc-token-hash/lib/index.js:6:18)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (file:///Users/anandl/projects/chatty/rev/.next/server/middleware.js:1490:1)
at webpack_require (file:///Users/anandl/projects/chatty/rev/.next/server/edge-runtime-webpack.js:37:33)
at fn (file:///Users/anandl/projects/chatty/rev/.next/server/edge-runtime-webpack.js:273:21)
at eval (webpack-internal:///(middleware)/./node_modules/openid-client/lib/client.js:11:19)
at (middleware)/./node_modules/openid-client/lib/client.js (file:///Users/anandl/projects/chatty/rev/.next/server/middleware.js:1511:1)
Environment
Reproduction URL
https://github.com/anandlingaraj/nexty
Describe the issue
Unable to add NextAuth with ADB2C. > rev@0.1.0 dev
▲ Next.js 15.0.3
Environments: .env
✓ Starting... ✓ Ready in 909ms ✓ Compiled /middleware in 58ms ✓ Compiled (307 modules) ⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring') at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
○ Compiling /_not-found ...
✓ Compiled /_not-found in 1714ms (877 modules)
GET /login 404 in 3ms
GET / 404 in 3ms
GET /_next/static/webpack/a480f6292504d7ae.webpack.hot-update.json 404 in 1539ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
✓ Compiled in 199ms (845 modules)
GET / 404 in 1ms
⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
GET /_next/static/webpack/a480f6292504d7ae.webpack.hot-update.json 404 in 225ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 6ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 1ms
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'substring')
at (node_modules/oidc-token-hash/lib/shake256.js:3)
at (middleware)/./node_modules/oidc-token-hash/lib/shake256.js (.next/server/middleware.js:1500:1)
at __webpack_require (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/oidc-token-hash/lib/index.js (.next/server/middleware.js:1490:1)
at __webpack_require__ (.next/server/edge-runtime-webpack.js:37:33)
at fn (.next/server/edge-runtime-webpack.js:273:21)
at (middleware)/./node_modules/openid-client/lib/client.js (.next/server/middleware.js:1511:1)
GET /login 404 in 0ms
How to reproduce
Just Cant start the app at all after adding authentication.
Expected behavior
Expected to redirect to login page.