Emails not updating after sync v0.43.4

For a while now (on the last few major versions), i've noticed my emails (gmail) will not update in twenty when there's new emails sent and received. I can spin up a new twenty stack in docker, it'll sync all emails, customers etc with the most recent emails. But anything new after that is not synced. I've followed all the steps in the documentation for the latest versions, i have all the workers running. Is there anything i should check?
12 Replies
thomast
thomast4d ago
@Raphaël could you have a look?
Guillaume
Guillaume4d ago
Can you tell us what environment variable from your .env you use (please hide the credentials ones) There has been a couple changes highlighted in our release documentation lately, some about environment variables
paulyili
paulyiliOP4d ago
@Guillaume This is my .env (which is properly filled out) I have twenty running behind it's own nginx (not sure if that's an issue, but it never was before) TAG=v0.43.4 APP_SECRET= SIGN_IN_PREFILLED=false PG_DATABASE_USER=postgres PG_DATABASE_PASSWORD= PG_DATABASE_HOST=db PG_DATABASE_PORT=5432 REDIS_URL=redis://redis:6379 SERVER_URL=https://crm.mydomain.com.au MESSAGE_QUEUE_TYPE=bull-mq STORAGE_TYPE=s3 STORAGE_S3_REGION=ap-southeast-2 STORAGE_S3_NAME=twenty-crm STORAGE_S3_ENDPOINT=https://minioapi.mydomain.au/ STORAGE_S3_ACCESS_KEY_ID= STORAGE_S3_SECRET_ACCESS_KEY= -- Auth -- MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true AUTH_GOOGLE_APIS_CALLBACK_URL=https://mydomain/auth/google-apis/get-access-token AUTH_PASSWORD_ENABLED=false AUTH_GOOGLE_ENABLED=true AUTH_GOOGLE_CLIENT_ID=-.apps.googleusercontent.com AUTH_GOOGLE_CLIENT_SECRET= AUTH_GOOGLE_CALLBACK_URL=https://mydomain/auth/google/redirect -- Email -- EMAIL_FROM_ADDRESS= EMAIL_FROM_NAME=Admin EMAIL_SYSTEM_ADDRESS= EMAIL_DRIVER=smtp EMAIL_SMTP_HOST=smtp.gmail.com EMAIL_SMTP_PORT=465 EMAIL_SMTP_USER= EMAIL_SMTP_PASSWORD= -- Security -- API_RATE_LIMITING_TTL=500 API_RATE_LIMITING_LIMIT=10000 API_TOKEN_EXPIRES_IN=1000y
Above.com Domain Investment Platform - Registrar, Monetization, Mar...
Innovative Domain Name Investor Platform for registering domains, monetizing domains, and buying or selling domains.
paulyili
paulyiliOP4d ago
i have the env to both worker and frontend containers
Guillaume
Guillaume4d ago
thanks for sharing this. Do you see any error in the logs ?
paulyili
paulyiliOP4d ago
this is the most obvious error i can see. it has happened each time i've spun up a new twenty stack [Nest] 34 - 03/05/2025, 10:00:00 AM LOG [MessagingOngoingStaleJob] Sync for message channel 720ff3dd-eacb-4210-9021-f2459b3c5094 and workspace 9eac4824-4a4c-49ff-ac38-fdbe10512dd7 is stale. Setting sync stage to MESSAGES_IMPORT_PENDING [Nest] 34 - 03/05/2025, 10:00:00 AM LOG [MessagingMessagesImportService] Messaging import for workspace 9eac4824-4a4c-49ff-ac38-fdbe10512dd7 and account a23fdc4b-ca69-4c72-b9bb-61845ab4abd0 starting... [Nest] 34 - 03/05/2025, 10:00:06 AM LOG [GmailGetMessagesService] Messaging import for workspace 9eac4824-4a4c-49ff-ac38-fdbe10512dd7 and account a23fdc4b-ca69-4c72-b9bb-61845ab4abd0 fetching 200 messages in 5580ms [Nest] 34 - 03/05/2025, 10:00:06 AM LOG [GmailGetMessagesService] Messaging import for workspace 9eac4824-4a4c-49ff-ac38-fdbe10512dd7 and account a23fdc4b-ca69-4c72-b9bb-61845ab4abd0 formatting 200 messages in 91ms @Guillaume Exception Captured undefined [ Error: Email is required at getDomainNameByEmail (/app/packages/twenty-server/dist/src/utils/get-domain-name-by-email.js:13:15) at /app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/utils/filter-emails.util.js:46:133 at Array.every (<anonymous>) at /app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/utils/filter-emails.util.js:46:65 at Array.filter (<anonymous>) at filterOutInternals (/app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/utils/filter-emails.util.js:41:21) at filterEmails (/app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/utils/filter-emails.util.js:20:16) at MessagingMessagesImportService.processMessageBatchImport (/app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/services/messaging-messages-import.service.js:99:71) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async MessagingMessagesImportJob.handle (/app/packages/twenty-server/dist/src/modules/messaging/message-import-manager/jobs/messaging-messages-import.job.js:63:9) ]
Guillaume
Guillaume4d ago
Ok I fixed this issue on monday. It will be avaialble in the next release (end of next week)
paulyili
paulyiliOP4d ago
would this be causing the emails not updating on the regular ?
Guillaume
Guillaume4d ago
Well I think that this issue might stop your worker from fetching messages. Here is the fix if you want to have a look https://github.com/twentyhq/twenty/pull/10625
paulyili
paulyiliOP4d ago
@Guillaume is it on the main? or not yet.
Guillaume
Guillaume4d ago
yes its on main
paulyili
paulyiliOP4d ago
might try it out

Did you find this page helpful?