T
Twentyβ€’4mo ago
greg [iero]

White empty page (Token expired)

Hello I'm on Twenty 0.23.1. Since this update, I have often (several time per day) errors. When I refresh, I get a white page. It seems that my token expired (?). I cannot log back without removing all cache/cookies.
Exception Captured
{ user: undefined }
[
AuthException [Error]: Token has expired.
at TokenService.verifyJwt (/app/packages/twenty-server/dist/src/engine/core-modules/auth/services/token.service.js:367:23)
at TokenService.validateToken (/app/packages/twenty-server/dist/src/engine/core-modules/auth/services/token.service.js:175:36)
at GraphQLHydrateRequestFromTokenMiddleware.use (/app/packages/twenty-server/dist/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.js:49:44)
at /app/node_modules/@nestjs/core/router/router-proxy.js:9:23
at Layer.handle [as handle_request] (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:144:13)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7) {
code: 'FORBIDDEN_EXCEPTION'
}
]
Exception Captured
{ user: undefined }
[
AuthException [Error]: Token has expired.
at TokenService.verifyJwt (/app/packages/twenty-server/dist/src/engine/core-modules/auth/services/token.service.js:367:23)
at TokenService.validateToken (/app/packages/twenty-server/dist/src/engine/core-modules/auth/services/token.service.js:175:36)
at GraphQLHydrateRequestFromTokenMiddleware.use (/app/packages/twenty-server/dist/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.js:49:44)
at /app/node_modules/@nestjs/core/router/router-proxy.js:9:23
at Layer.handle [as handle_request] (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:144:13)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7)
at next (/app/node_modules/@nestjs/platform-express/node_modules/express/lib/router/route.js:140:7) {
code: 'FORBIDDEN_EXCEPTION'
}
]
Any idea why? I did not set anything specific regarding token times in .env file.
No description
No description
10 Replies
greg [iero]
greg [iero]OPβ€’4mo ago
Tested on Safari and Firefox, same behaviour
Raph
Raphβ€’4mo ago
@greg [iero] I'm experiencing the same issue.
greg [iero]
greg [iero]OPβ€’4mo ago
I enforced those parameters:
ACCESS_TOKEN_EXPIRE_IN=30m
REFRESH_TOKEN_EXPIRES_IN=7d
ACCESS_TOKEN_EXPIRE_IN=30m
REFRESH_TOKEN_EXPIRES_IN=7d
But no change.
charles
charlesβ€’4mo ago
mmmh this looks to be a quite bad behavior, we will prioritize a fix tomorrow in the meantime, you can put ACCESS_TOKEN_EXPIRE_IN=7d, you should be good for the week :p
greg [iero]
greg [iero]OPβ€’4mo ago
thanks, @charles Hi @charles No change with ACCESS_TOKEN_EXPIRE_IN=7d, I have the empty page this morning again I'm available for a call if you need to test something for the fix!
charles
charlesβ€’4mo ago
Ok! when are you available today?
greg [iero]
greg [iero]OPβ€’4mo ago
-> PM For @Raph : in your .env:
ACCESS_TOKEN_EXPIRES_IN=7d
ACCESS_TOKEN_EXPIRES_IN=7d
(note the 'S' at expireS) and in docker-compose file:
server:
environment:
ACCESS_TOKEN_EXPIRES_IN: ${ACCESS_TOKEN_EXPIRES_IN}
server:
environment:
ACCESS_TOKEN_EXPIRES_IN: ${ACCESS_TOKEN_EXPIRES_IN}
and it works now
Raph
Raphβ€’4mo ago
@greg [iero] Thank you!! @greg [iero] @charles - When the token expires, will the user be routed back to the login page? Or, will the user be presented with a null route (white screen)? i suppose I could wait for a week and see what happens. 😜
greg [iero]
greg [iero]OPβ€’4mo ago
They are working on a fix
charles
charlesβ€’4mo ago
The fix has been merged in included in the last 0.24 release πŸ™‚
Want results from more Discord servers?
Add your server