Any idea why `Session.getSession(context.req, cont...
# support-questions-legacy
t
Any idea why
Session.getSession(context.req, context.res)
fails in
getServerSideProps()
with the error:
Copy code
SessionError: Session does not exist. Are you sending the session tokens in the request with the appropriate token transfer method?
    at Object.<anonymous> (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:192:27)
    at Generator.next (<anonymous>)
    at /var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:66:75
    at new Promise (<anonymous>)
    at __awaiter (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:48:16)
    at Object.getSession (/var/task/node_modules/supertokens-node/lib/build/recipe/session/recipeImplementation.js:172:20)
    at Object.<anonymous> (/var/task/node_modules/supertokens-node/lib/build/recipe/session/sessionRequestFunctions.js:145:51)
    at Generator.next (<anonymous>)
    at /var/task/node_modules/supertokens-node/lib/build/recipe/session/sessionRequestFunctions.js:30:75
    at new Promise (<anonymous>) {
  type: 'UNAUTHORISED',
  payload: { clearTokens: false },
  errMagic: 'ndskajfasndlfkj435234krjdsa',
  fromRecipe: 'session'
}
It works locally, but not in production. NextJS frontend app is hosted on vercel & node/fastify server is hosted on aws apprunner Tried updating supertokens to the latest version
13 Views