Retool self-hosted instance, login issue internal server error 500

Hi,

We are running a self-hosted instance of Retool, and we're experiencing a login issue affecting some users. After completing two-factor authentication, a few users receive a "500 Internal Server Error" and are unable to log in.

We've reviewed the logs and confirmed the error. Interestingly, while some users can still log in without issues, the number of affected users is gradually increasing. We also tested login attempts in an incognito window, but the issue persists.

Could you please help us investigate this? Thanks

"level": "error", 
"msg": "Internal server error: option expires is invalid"
"level": "error", 
"msg": "Internal server error: invalid input syntax for type timestamp with time zone: \"Invalid date\""

Edit

"level": "error", 
"msg": "invalid input syntax for type timestamp with time zone: \"Invalid date\"", 
"requestId": "8060e1e1aab8af62da8375b656b6244a", 
"stack": "Error at Query.run (/retool_backend/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)
    at /retool_backend/node_modules/sequelize/lib/sequelize.js:315:28
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async PostgresQueryInterface.insert (/retool_backend/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21)
    at async iD.save (/retool_backend/node_modules/sequelize/lib/model.js:2490:35)
    at async session.create (/retool_backend/node_modules/sequelize/lib/model.js:1362:12)
    at async HasMany.create (/retool_backend/node_modules/sequelize/lib/associations/has-many.js:301:12)
    at async IXe (/retool_backend/bundle/main.js:1420:46848)
    at async Ife (/retool_backend/bundle/main.js:2493:272)
    at async G7i (/retool_backend/bundle/main.js:3151:55221)
    at async /retool_backend/bundle/main.js:3871:28742", 
"thisQuery": "INSERT INTO \"sessions\" (\"id\",\"userId\",\"accessToken\",\"expirationDate\",\"status\",\"createdAt\",\"updatedAt\") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6) RETURNING \"id\",\"userId\",\"accessToken\",\"expirationDate\",\"status\",\"state\",\"createdAt\",\"updatedAt\";", 
"timestamp": "2025-05-06T12:28:26.013Z", 
"type": "DATABASE_ERROR"

Hi @AhmedR,

Thanks for reaching out. Apologies for the delay here. Is your team still experiencing this bug? I don't see similar reports that would indicate a more widespread outage :thinking:

I would say have folks try clearing their cache, but it's interesting that it is happening in incognito.

Which type of 2fa? Enable two-factor authentication | Retool Docs If OTP, what authenticator app are folks using when it isn't working? What browser are folks using to try to log in?

What version of Retool are you running?