twentyhq / twenty

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

Notes Creation Bug: Unable to Save Title or Content #7231

Open rob-luke opened 1 month ago

rob-luke commented 1 month ago

Bug Description

When attempting to create a new note in Twenty, it often (80% of the time) won't save the title or content. Often it appears like the text is saved, but if you refresh or leave the page and come back its gone.

Steps to reproduce:

Navigate to a company or person profile

image

Expected behavior

When entering a title or content for a new note and then clicking outside the text entry box or hitting enter, the note should be saved successfully without any error messages.

Technical inputs

Current workaround:

I am self hosting the latest release of twenty, and everything else works fine. Please let me know if additional info would help

Bonapara commented 1 month ago

Can't reproduce 🤔 @Weiko, does that mean anything to you?

rob-luke commented 1 month ago

Would it help if I make a video showing the process?

rob-luke commented 1 month ago

@Bonapara thanks for trying to reproduce the bug. Attached is a video demonstrating the notes bug. I also captured an occurance of the notes working correctly. Hope this helps. Let me know if you need any more info

https://github.com/user-attachments/assets/bdf63754-30e3-45bc-9583-8e75b3a7d691

Bonapara commented 1 month ago

@ijreilly, do you think this bug is related to @rob-luke environment/config?

ijreilly commented 1 month ago

Hi @rob-luke , thanks for sharing! I was not able to reproduce either, but I see there are some errors thrown when you are navigating so I suppose there is an error while attempting to save. Can you try again and share the details of the failing requests from your Network tab? It should be a graphql query with an "error" in the response payload.

Capture d’écran 2024-09-30 à 11 50 13
rob-luke commented 1 month ago

Thanks @ijreilly and @Bonapara for helping look in to this. I have updated to the latest release v0.30.2 and still the bug occurs.

I am not experienced with debugging this type of software, so please excuse if I sent too much or the wrong info below.

Here are two images of the error. I can't see an error in the response payload. But I screenshoted what was red in the network tab.

Does this help?

Screenshot 2024-10-03 at 9 01 41 PM Screenshot 2024-10-03 at 9 02 06 PM

Also, here is my docker-compose setup (I replaced sensitive data with AAAAA):

version: "3.8"

services:

  twenty:
    image: twentycrm/twenty:v0.30.2
    volumes:
      - /home/AAAAA/twenty/server:/app/${STORAGE_LOCAL_PATH:-.local-storage}
      - /home/AAAAA/twentydata/:/app/docker-data
    ports:
      - 3854:3854
    restart: always
    depends_on:
      - twenty-redis
    environment:
      PORT: 3854
      PG_DATABASE_URL: postgres://AAAAA:AAAAA@AAAAA:AAAAA/default
      SERVER_URL: https://AAAAA.AAAAA.com
      FRONT_BASE_URL: https://AAAAA.AAAAA.com

      ENABLE_DB_MIGRATIONS: "true"

      SIGN_IN_PREFILLED: "false"
      IS_SIGN_UP_DISABLED: "false"
      LOGIN_TOKEN_EXPIRES_IN: 90d
      REFRESH_TOKEN_EXPIRES_IN: 14d
      ACCESS_TOKEN_EXPIRES_IN: 30m

      STORAGE_TYPE: s3
      STORAGE_S3_REGION: AAAAA
      STORAGE_S3_NAME: AAAAA
      AWS_ACCESS_KEY_ID: AAAAA
      AWS_SECRET_ACCESS_KEY: AAAAA

      ACCESS_TOKEN_SECRET: AAAAA
      LOGIN_TOKEN_SECRET: AAAAA
      REFRESH_TOKEN_SECRET: AAAAA
      FILE_TOKEN_SECRET: AAAAA

      AUTH_GOOGLE_ENABLED: "true"
      MESSAGING_PROVIDER_GMAIL_ENABLED: "true"
      CALENDAR_PROVIDER_GMAIL_ENABLED: "true"
      CALENDAR_PROVIDER_GOOGLE_ENABLED: "true"
      AUTH_GOOGLE_APIS_CALLBACK_URL: https://AAAAA.AAAAA.com/auth/google-apis/get-access-token
      AUTH_GOOGLE_CALLBACK_URL: https://AAAAA.AAAAA.com/auth/google/redirect
      AUTH_GOOGLE_CLIENT_ID: AAAAA
      AUTH_GOOGLE_CLIENT_SECRET: AAAAA

      REDIS_HOST: AAAAA
      REDIS_PORT: AAAAA
      CACHE_STORAGE_TYPE: redis
      CACHE_STORAGE_TTL: 3600
      MESSAGE_QUEUE_TYPE: bull-mq

  twenty-worker:
    image: twentycrm/twenty:v0.30.2
    volumes:
      - /home/AAAAA/twenty/server:/app/${STORAGE_LOCAL_PATH:-.local-storage}
      - /home/AAAAA/twentydata/:/app/docker-data
    restart: always
    command: yarn worker:prod
    ports:
      - 3855:3855
    depends_on:
      - twenty-redis
      - twenty
    environment:
      PORT: AAAAA
      PG_DATABASE_URL: postgres://AAAAA:AAAAA@AAAAA:AAAAA/default
      SERVER_URL: https://AAAAA.AAAAA.com
      FRONT_BASE_URL: https://AAAAA.AAAAA.com

      ENABLE_DB_MIGRATIONS: "true"
      IS_LINKS_FIELD_ENABLED: "true"

      SIGN_IN_PREFILLED: "false"
      IS_SIGN_UP_DISABLED: "false"
      LOGIN_TOKEN_EXPIRES_IN: 90d
      REFRESH_TOKEN_EXPIRES_IN: 14d
      ACCESS_TOKEN_EXPIRES_IN: 30m

      STORAGE_TYPE: s3
      STORAGE_S3_REGION: AAAAA
      STORAGE_S3_NAME: AAAAA
      AWS_ACCESS_KEY_ID: AAAAA
      AWS_SECRET_ACCESS_KEY: AAAAA

      ACCESS_TOKEN_SECRET: AAAAA
      LOGIN_TOKEN_SECRET: AAAAA
      REFRESH_TOKEN_SECRET: AAAAA
      FILE_TOKEN_SECRET: AAAAA

      AUTH_GOOGLE_ENABLED: "true"
      MESSAGING_PROVIDER_GMAIL_ENABLED: "true"
      CALENDAR_PROVIDER_GMAIL_ENABLED: "true"
      CALENDAR_PROVIDER_GOOGLE_ENABLED: "true"
      AUTH_GOOGLE_APIS_CALLBACK_URL: https://AAAAA.AAAAA.com/auth/google-apis/get-access-token
      AUTH_GOOGLE_CALLBACK_URL: https://AAAAA.AAAAA.com/auth/google/redirect
      AUTH_GOOGLE_CLIENT_ID: AAAAA
      AUTH_GOOGLE_CLIENT_SECRET: AAAAA

      REDIS_HOST: AAAAA
      REDIS_PORT: AAAAA
      CACHE_STORAGE_TYPE: redis
      CACHE_STORAGE_TTL: 3600
      MESSAGE_QUEUE_TYPE: bull-mq

  twenty-redis:
    image: redis
    ports:
      - 6379:6379
rob-luke commented 4 weeks ago

Any additional information I can provide on this @Bonapara @ijreilly @charlesBochet ?

ijreilly commented 4 weeks ago

Hi @rob-luke sorry for the late reply Could you try to find the query with an "error" in the Preview sub-tab of Network tab, as on the picture below, and copy paste the full error message here? If you really don't find it we can schedule a call at some point! It is probably a "graphql" query failing (as opposed to "metadata" on my screenshot). I will make sure that I get back to you faster.

Capture d’écran 2024-10-10 à 16 18 20
Weiko commented 4 weeks ago

Hi @rob-luke, I've investigated the issue and it looks like it's coming from the frontend. Your note object contains a field with a fieldType that is not supported for some reason. I think this issue is very specific so it might be easier to contact us on discord, feel free to ping me there so we can investigate together and check your DB. In the meantime I will land a patch for the v0.31.1 to make this error message more explicit.

rob-luke commented 3 weeks ago

Thanks @ijreilly and @Weiko Unfortunately I can't find the error in the network tab, so I will reach out on discord to debug deeper together. Thanks for the help. Once we find it, I will post the solution we find here incase anyone else has the same issue

rob-luke commented 1 week ago

Sorry for the delay on my side @ijreilly @Weiko , I have reached out on discord here: https://discord.com/channels/1130383047699738754/1286140280579559561/1300608378309181510

rob-luke commented 1 day ago

Hi all, can we reopen this for visibility and incase anyone else is having the same issue? Thanks

Bonapara commented 23 hours ago

Do you still have it @rob-luke?