3 months ago
I have created an n8n environment with the public networking as primary-production-5918.up.railway.app. I am able to login to this instance and able to create a workflow, however when i try to do the Google drive authentication using Outh redirect URL, Client Id and Client Secret, I am getting an error below
Not Found
The train has not arrived at the station.
Please check your network settings to confirm that your domain has provisioned.
If you are a visitor, please let the owner know you're stuck at the station.
Request ID:
KWTIVhkUS7-NI1AaAXC71g
Can you please share the screen shot what to do next?
3 Replies
Status changed to Awaiting Railway Response Railway • 3 months ago
3 months ago
The error "The train has not arrived at the station" is Railway's own 404 page — it means the OAuth redirect URL that Google is trying to hit doesn't resolve to your service. This is a misconfiguration between what you set in Google Cloud Console and your actual Railway domain.
Here's what's likely going wrong and how to fix it:
1. Check what redirect URL n8n is actually using
In your n8n instance, go to Settings → OAuth2 Credentials and look at the "OAuth Redirect URL" field. It should show something like:
https://primary-production-5918.up.railway.app/rest/oauth2-credential/callback
Copy that exact URL.
2. Make sure that URL is registered in Google Cloud Console
Go to console.cloud.google.com → APIs & Services → Credentials → your OAuth 2.0 Client ID → Authorized redirect URIs.
The URL from step 1 must be listed there exactly. Even a trailing slash difference will cause it to fail.
3. Make sure your Railway domain is actually active
Go to your Railway service → Settings → Networking, and confirm the domain primary-production-5918.up.railway.app is listed and active. If it was recently redeployed or the service was recreated, the domain might have changed.
The most common cause of this specific error is that the redirect URI in Google Console is pointing to a slightly different URL than what n8n is generating — double-check they match character for character.
3 months ago
Thank you for your response. Yesterday when I was following this process, for reason unknown, I was continuously getting the same error. After close monitoring I noticed that, the railway domain was created with primary-production-5918.up.railway.app, however the "OAuth Redirect URL" was generated https://primary-production-0640.up.railway.app/rest/oauth2-credential/callback. This is strange as I don't have control on OAuth redirect URL as it is always greyed out. So I changed the domain name from primary-production-5918.up.railway.app to primary-production-0640.up.railway.app, and re-established the OAuth process. While doing So I was getting an additional error "There was a problem generating the authorization URL. Request failed with status code 414". I logged off from edge and cleared cache and browse history, post which the connection was successful. Thank you once again for you guidance and support.
Attachments
Thank you for your response. Yesterday when I was following this process, for reason unknown, I was continuously getting the same error. After close monitoring I noticed that, the railway domain was created with [primary-production-5918.up.railway.app](http://primary-production-5918.up.railway.app), however the "OAuth Redirect URL" was generated [https://primary-production-0640.up.railway.app/rest/oauth2-credential/callback](https://primary-production-5918.up.railway.app/rest/oauth2-credential/callback). This is strange as I don't have control on OAuth redirect URL as it is always greyed out. So I changed the domain name from [primary-production-5918.up.railway.app](http://primary-production-5918.up.railway.app) to [primary-production-0640.up.railway.app](http://primary-production-5918.up.railway.app), and re-established the OAuth process. While doing So I was getting an additional error "There was a problem generating the authorization URL. Request failed with status code 414". I logged off from edge and cleared cache and browse history, post which the connection was successful. Thank you once again for you guidance and support.
3 months ago
Glad you got it working!
To clarify what happened: the mismatch between your Railway domain primary-production-5918) and the OAuth Redirect URL that n8n generated primary-production-0640) was the root cause. This can happen when n8n internally resolves its own URL using a different hostname than the one you configured as your public domain in Railway — typically caused by the WEBHOOK_URL or N8N_EDITOR_BASE_URL environment variable not being set, or pointing to a stale/different domain.
The 414 (URI Too Long) error you hit after changing the domain was likely caused by cached/stale OAuth state or cookies from previous failed attempts — which is exactly why clearing cache and browser history fixed it.
For future reference, to prevent the OAuth Redirect URL mismatch, make sure you have the WEBHOOK_URL environment variable set in your Railway service to match your actual public domain, e.g.:
WEBHOOK_URL=https://primary-production-0640.up.railway.app
This ensures n8n generates all callback URLs using the correct domain.