DATABASE_URL on Vercel missing host

claudiorivera
HOBBY

2 years ago

I've been using the Railway integration on Vercel for a long time now with no issues.

However, since the new Postgres service rolled out, the Vercel integration appears to be broken and providing a malformed DATABASE_URL.

Steps to reproduce:

  • Create a new Postgres service in Railway

  • Create a new Next.js app on Vercel that uses the postgres driver

  • Configure the Vercel integration on Railway

  • Look at the value for DATABASE_URL in Vercel

Instead of ending with @[viaduct.proxy.rlwy.net:58449/railway](viaduct.proxy.rlwy.net:58449/railway) like when it's viewed on Railway, the value on Vercel ends with @:/railway which causes the postgres driver in the Next.js app to throw ERR_INVALID_URL.

As a workaround, I've manually edited the value of DATABASE_URL in Vercel to be the full/valid value from Railway, but it would be nice if I didn't have to do that.

Any idea what might be going on?

1 Replies

2 years ago

Thanks for reporting this! Really appreciate the clear reproduction steps.

This is definitely something on our end - we encrypt all variables and it looks like we're not sending the decrypted values to Vercel over here.