[GET] /api/logout
11:54:03:19
2020-05-26T18:54:03.855Z 2a200611-cd1a-4241-ac04-034baa783aca ERROR TypeError [ERR_INVALID_CHAR]: Invalid character in header content [“Location”]
at ServerResponse.setHeader (_http_outgoing.js:529:3)
at ServerResponse.writeHead (_http_server.js:273:21)
at Object. (/var/task/node_modules/@auth0/nextjs-auth0/dist/handlers/logout.js:30:13)
at Generator.next ()
at /var/task/node_modules/tslib/tslib.js:115:75
at new Promise ()
at Object.__awaiter (/var/task/node_modules/tslib/tslib.js:111:16)
at Object.handleLogout (/var/task/node_modules/@auth0/nextjs-auth0/dist/handlers/logout.js:11:34)
at logout (/var/task/.next/serverless/pages/api/logout.js:174:70)
at apiResolver (/var/task/node_modules/next/dist/next-server/server/api-utils.js:6:7) {
code: ‘ERR_INVALID_CHAR’
}
When I look at the headers in req, res in network tab, I don’t see a Location. The only real mention of Location in the code is in the ssr-profile.js page which sets a 302.
I’m still experiencing this problem even though I’ve verified my config is good. Does anyone know how to troubleshoot the creation of response headers after logout is complete. The logout successfully removes cookies from the browser. I can’t figure out what is in the Location header that is causing the problem.
This has been resolved. Rebecca did so by removing all env variables added to the Vercel online application settings. Then, adding the secrets using the now CLI now secrets add and deploying the app by setting up other env variables in now.json and using now --prod .