a year ago
I deployed Cal template on Railway, but when I open the URL, it is showing a blank page. The logs show a lot of errors. I have tried redeploying multiple times (and tried created a new project as well), but I am getting the same errors every time. Can someone please help?
0 Replies
a year ago
this template?
a year ago
okay ill deploy it and see whats up
a year ago
did you provide your google api credential?
I just noticed some discrepancy on my Google Cloud Console. I'll make the changes and update you if it solves the issue.
I had not added my custom domain to my Railway project, but my Authorized redirect URIs were pointing to the custom domain on Google Cloud. I added the domain on Railway, but I am still getting the same blank screen when I open the URL.
a year ago
have you followed their docs?
Yes, I just rechecked all the steps again. The only change I made a few minutes ago was changing GOOGLELOGINENABLED from false to true (I thought it might fix the issue).
One of the errors I am seeing in the logs a lot is:
2024-03-03 04:30:07.842 UTC [159] ERROR: relation "public.users" does not exist at character 57
2024-03-03 04:30:07.842 UTC [159] STATEMENT: SELECT COUNT(*) FROM (SELECT "public"."users"."id" FROM "public"."users" WHERE 1=1 OFFSET $1) AS "sub"
@calcom/web:start: PrismaClientKnownRequestError:
@calcom/web:start: Invalid `prisma.user.count()` invocation:
@calcom/web:start:
@calcom/web:start:
@calcom/web:start: The table `public.users` does not exist in the current database.
@calcom/web:start: at Cn.handleRequestError (/calcom/node_modules/@prisma/client/runtime/library.js:123:6817)
@calcom/web:start: at Cn.handleAndLogRequestError (/calcom/node_modules/@prisma/client/runtime/library.js:123:6206)
@calcom/web:start: at Cn.request (/calcom/node_modules/@prisma/client/runtime/library.js:123:5926)
@calcom/web:start: at async l (/calcom/node_modules/@prisma/client/runtime/library.js:128:9968)
@calcom/web:start: at async getServerSideProps (/calcom/apps/web/.next/server/pages/auth/login.js:1:10204) {
@calcom/web:start: code: 'P2021',
@calcom/web:start: clientVersion: '5.4.2',
@calcom/web:start: meta: { table: 'public.users' }
@calcom/web:start: }
@calcom/web:start: 04:30:08:324 WARNorgDomains.ts Match of WEBAPP_URL with ALLOWED_HOSTNAME failed {
@calcom/web:start: WEBAPP_URL: 'https://cal-production-baf8.up.railway.app';,
@calcom/web:start: ALLOWED_HOSTNAMES: []
@calcom/web:start: }
So I went to the data tab in Railway, but it wasn't working. Spent a lot of time trying to figure out how to make it work, but then I saw a message in this server that I should use an external database client to access the database. I downloaded DBeaver, enabled external network in Postgres on Railway, entered all the details in DBeaver, but it couldn't connect to the database. So now I am back to the beginning :(
a year ago
a redeploy of the database is required after enabling the tcp proxy for the very first time
a year ago
are you still using the railway provided domain, or have you added a custom domain?
a year ago
have you redeployed the cal service since then?
a year ago
are you sure you are using all the correct credentials?
I noticed Railway did not automatically add the public host in Postgres service's variables:
a year ago
nope, please don't that would only mess something else up
a year ago
show me a screenshot of the public network section of the database service settings
a year ago
that is an http domain, postgres does not use http, postgres uses tcp
a year ago
that internal port looks wrong
a year ago
it's 5432, you where close
a year ago
okay now a redeploy is needed
Should I put these values in DBeaver?
Host: viaduct.proxy.rlwy.net
Port: 5432
Database: railway
Username:
Password:
a year ago
5432 is the internal port, you need to use the public port (the bigger number)
a year ago
maybe migrations didn't run for some reason
a year ago
I wonder if cal changed something
a year ago
honestly no clue right now, I may have created the template, but I don't personally use it
a year ago
try deploying the template again?
a year ago
nah 3 times is good
I think the issue is linked to Cal. Found a thread on their server which might be linked to this:
a year ago
hmmm, my template uses postgres 16
a year ago
their offical self hosted docs for docker use postgres 16
https://github.com/calcom/docker/issues/329 - looks like the current quick fix is to use v3.7.11 tag. They haven't released the docker image for the latest version.
a year ago
okay swap the image in use to that tag
a year ago
correct
Changed it to calcom/cal.com:v3.7.11. Redeploying now.
Applying migration `20231110122349_paid_apps`
Applying migration `20231113131945_idx_teamid_verification_token`
Applying migration `20231113202947_add_ical_columns_to_booking`
Applying migration `20231114090318_add_avatar_url`
Applying migration `20231117002911_add_users_locked`
Applying migration `20231117081852_idx_eventtype_scheduleid`
Applying migration `20231202181233_adding_show_first_available_timeslot`
Applying migration `20231203154633_adding_is_mandatory_reminder_field_for_mandatory_reminders`
Applying migration `20231206191034_add_cal_video_logo`
Applying migration `20231206220118_add_recurring_event_id`
Applying migration `20231213083720_add_meeting_started_webhook`
Applying migration `20231213153230_add_instant_meeting`
Applying migration `20240105110500_removed_newbooker_feature_flag`
Applying migration `20240109041925_add_out_of_office_entry_table`
Applying migration `20240111075727_remove_brand_colours_default`
Applying migration `20240114195534_assign_all_team_members`
I see a lot of logs like this 👀
I hope it works.
a year ago
migrations are running, thats good
a year ago
updated the template too temporarily, thanks for bringing this up
I'll keep an eye on their releases. I hope it is fixed soon. Will ping you if there's an update.
a year ago
sounds good!
a year ago
i tested a template deploy with the latest tag, and adding a DATABASE_DIRECT_URL
variable and i can see that the migrations where ran
a year ago
the same as the DATABASE_URL
variable
${{Postgres.DATABASE_PRIVATE_URL}}
Trying this with calcom/cal.com
a year ago
awesome, then I'll add that variable to the public template and go back to the latest tag
a year ago
Hi @Master Adit I just see you were running in the same issues as I did when I’ve tried cal. Would you please be available for assisting me via dm when I do a retry, please
a year ago
Looking forward to receive your expertise