Hi everyone,
I’m currently getting this error every once in a while after a two days or so of being idle. Clearing my cookies and logging back in fixes the issue. The error message I’m getting is:
TypeError: Cannot read properties of undefined (reading 'getHeader')
at NodeCookies.getSetCookieHeader (<repo_path>/master/node_modules/@auth0/nextjs-auth0/dist/auth0-session/utils/cookies.js:47:27)
at Cookies.commit (<repo_path>/master/node_modules/@auth0/nextjs-auth0/dist/auth0-session/utils/cookies.js:31:36)
at StatelessSession.<anonymous> (<repo_path>/master/node_modules/@auth0/nextjs-auth0/dist/auth0-session/session/stateless-session.js:204:38)
at step (<repo_path>/master/node_modules/tslib/tslib.js:193:27)
at Object.next (<repo_path>/master/node_modules/tslib/tslib.js:174:57)
at fulfilled (<repo_path>/master/node_modules/tslib/tslib.js:164:62) {
page: '/dashboard/manage-events'
}
I’m not sure what’s causing the issue, but it seems to be related to the ‘getHeader’ property of an undefined variable. I’m working with the @auth0/nextjs-auth0 package, and the error is being thrown from the cookies.js file.
Has anybody encountered this issue or know what else I should be looking at to fix it?
I’ve tried updating the package, but it’s already at the latest version and this still occasionally happens, so far it has only happened on local but am afraid it will happen on prod.
Thanks!