twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
20.02k stars 2.22k forks source link

Random crash and then logout #8347

Open chsasank opened 2 days ago

chsasank commented 2 days ago

I have deployed twenty using containers (but not using docker-compose). Here's an error I am getting once in a while:

Unexpected Application Error!
Scope id is not provided and cannot be found in context.

si@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:954:4652
hr@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:5845:5098
nOa@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:6229:517
jie@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:46:17091
hOe@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:44309
cOe@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:40008
Kmt@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:39931
gP@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:39776
UQ@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:36109
iOe@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:48:35054
C@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:33:1545
O@https://twenty.von-neumann.ai/assets/index-BqUDOfxQ.js:33:1903
image

I don't see any event in the server logs. What's frustrating about this crash is that I am getting logged out when I refresh the tab. It asks me to log in again.

chsasank commented 2 days ago

The relevant code seems to be here: https://github.com/twentyhq/twenty/blob/3793f6c4512bdf10efb7a4e51189f58dbf663ee0/packages/twenty-front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/__tests__/useAvailableScopeId.test.tsx#L12

chsasank commented 2 days ago

Containers themselves didn't restart either, just posting here for sanity:

(base) sasank@JOHNAIC:~/code/llama.lisp$ podman ps | grep twenty
db9c8c17e4ad  docker.io/library/redis:latest                     redis-server          30 hours ago  Up 30 hours  0.0.0.0:52951->3000/tcp                           systemd-twenty-redis
8ccd102a7806  docker.io/twentycrm/twenty-postgres:v0.31.2        /opt/bitnami/scri...  30 hours ago  Up 30 hours  0.0.0.0:52951->3000/tcp                           systemd-twenty-db
ca9b1da9d5fe  docker.io/twentycrm/twenty:v0.31.2                 sh /mnt/init_work...  30 hours ago  Up 30 hours  0.0.0.0:52951->3000/tcp                           systemd-twenty-worker
56a1c4ecb675  docker.io/twentycrm/twenty:v0.31.2                 node dist/src/mai...  26 hours ago  Up 26 hours  0.0.0.0:52951->3000/tcp                           systemd-twenty-server
harishnanthan commented 1 day ago

How can I reproduce this, @chsasank ? It will occur only when the'scopeId` is not found in context or props. It was used in many places, so I need to reproduce the steps.

chsasank commented 1 day ago

I use firefox if that helps. Unfortunately I don't have instructions to reliably reproduce. It just happened once in a while over last 2 days.