Setting up URL/Domain
I get a little stuck on this.
in the .env there's the:
If i have nginx proxy manager pointing crm.mydomain.com to port 3000.
all the methods i try, each time i try to use crm.mydomain.com, i get the same
"Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure resource '<URL>'. This request has been blocked; the content must be served over HTTPS."
what would be the correct method insetting up the URLs in the .env?
running on docker on ubuntu server.
i used the "One Command" method to install it. which is great.
30 Replies
the issue is that your frontend is served over https but your backend is served over http ; your browser considers this as a security flax (and it is right!)
You need to serve your backend over https. To do that you can either use a certificate manager such as let's encrypt or use another service that can generate ssl for you (such as cloudflare or cloudfront)
ahh i figured that was the case. previously i had both behind it's own nginx and had forwarded the nginx ip to my nginx proxy manager.
i felt like that was a good way do didn't need to manage SSls
i felt like that was a good way do didn't need to manage SSls
you should be able to do the same here!
99% sure i got it working using nginx. no errors are showing up.
Is the email sync working? i can't seem to get my emails to sync.
i can SSO and i can add the email account (multiple) with no issues.
do you have your worker running?
yarn worker:prod?
sorry this part is BADLY documented (when I say badly, is inexistent, it will be one of our April priority)
that's okay. it's still early days. Im mostly just testing and experimenting.
workers are running. i ran yarn worker:prod and everything is initalised.
but when i click "email settings" i get this error (screen shot)
![No description](https://cdn.answeroverflow.com/1226918886088245329/image.png)
@Weiko @Raphaël for you!
Hi @paulyili this error is unrelated to the sync, I can reproduce it on main though (cc @Raphaël), thank you I will create a ticket.
For the sync to work you will need to run some crons that will enqueue jobs in your queue. You will need to run
However, even without the queue, a first sync should have been executed (what we call "full-sync") already and you should see some emails in your message table (and even some contact automatically created). Let me know if that's not the case
Then gmail-partial-sync will take care of syncing your emails, you can adjust the cron pattern before executing the command above, in
packages/twenty-server/src/modules/messaging/commands/crons/patterns/fetch-all-workspaces-messages.cron.pattern.ts
(which is actually a bad name...). It will first query gmail and store all the new email ids in a cache. The second cron will take care of scanning the cache and fetch the content of those emails if the cache is not empty, this one should be executed right after.Hi Weiko,
This is what i've noticed.
in 0.3.3 it would sync my gmail and add all gmail contacts in the CRM and sync all emails
in 0.3.4 it would only sync the emails. not add any contacts.
in 0.4.0 it wont do either.
I tried to run those 2 commands with no luck.
this with the self hosted docker FYI.
Few things to check:
- If you are self-hosting, you need to make sure that your workspace has "active" in the
subscriptionStatus
, we should probably change that for self-hosting since it does not make much sense but currently we check that value when we run the cron.
- As I've described above, a cache is involved and if you don't use redis it will be in-memory which means after each refresh/reload of the server (so even code change will trigger it) it will probably reset that cache and messages that are waiting to be imported will be lost with the cache, that could explain the issue 🤔
- In 0.3.4 we moved contact creation outside of the message import logic to delegate it through a listener and its dedicated job, however the logic shouldn't have changed so as long as your contact emails do not match with those email providers packages/twenty-server/src/utils/email-providers.ts
it should correctly create people/companies and assign them (personId within the messageParticipant table)@Weiko how do i check the subscription status?
i installed redis and i connected twenty to it. it connected no problem.
when i try log in or create an accoung i get this in the logs(i've changed the names and id for secury reasons)
as soon as disconnect from redis, there's no errors.
Subscription status is inside core.workspace table.
For your Redis error, that's weird. Does it only happen when you try to connect your google account in the settings?
What's your redis version?
We don't use any Redis command that expects an integer 🤔
Do you have the stackstrace?
will check the db shortly.
redis version is 7.2.4. i just installed it using
docker run --name my-redis -d -p 6379:6379 redis
im not sure what stackstrace is. sorry im somewhat new to some of this,I've tried with 7.2.4 and can't reproduce your issue 🤔. Unfortunately the email sync won't work without Redis because we need to have a persistent cache shared between the worker and the main app which won't work with the in-memory cache.
I've just created a ticket to integrate sqlite for the cache, should be much easier to use for self-hosting.
Hopefully changing the subscriptionStatus will fix your issue