14 days ago
You can’t sign in because this app sent an invalid request. You can try again later or contact the developer about this issue. Learn more about this error
If you are a developer of this app, see error details.
Error 400: redirect_uri_mismatch
Error 400: redirect_uri_mismatch
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.
If you're the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=https://primary-production-3c2a2.up.railway.app/rest/oauth2-credential/callback flowName=GeneralOAuthFlow
In google platvorm, when i insert link:
https://primary-production-3c2a2.up.railway.app/rest/oauth2-credential/callback
into "Authorized redirect URIs"
its is an error when i press "save" button
6 Replies
14 days ago
Hey there! We've found the following might help you get unblocked faster:
🧵 N8N - Google API Oauth: Access blocked: authorisation error 400: invalid_request
🧵 YouTube Upload Node Works on n8n Cloud, But Fails with 400 Error on Railway
If you find the answer from one of these, please let us know by solving the thread!
i have been going through same thingwhat i noticed is when im adding https://primary-production-fbc5.up.railway.app/rest/oauth2-credential/callback its not workingbut when i remove my subdomain and just keep https://railway.app/rest/oauth2-credential/callback its workingi think its the subdomain isuue
14 days ago
Thank You.
I finally managed to save the link successfully that you offered. Also ChatGPT offered to try with http://localhost:5678/rest/oauth2-credential/callback, and i also managed to save these two links under "Authorized redirect URIs". But it is still error when i trying to login using google nodes (Error 400: redirect_uri_mismatch)
14 days ago
yes
I added a user to the test and gave him rights
I tried to click publish app
I gave all rights to the test user
I also tried through a service account, it worked with it but it has a limitation on creating files in the Google Drive folder, even in the shared folder
13 days ago
Thanks everyone. I bought a domain and now i probably need to wait while it "launching".
But a new problem arose.
I saw on YouTube that you can update n8n via deploy. I thought that maybe this would help somehow and clicked update. So I decided to update everything, redis, postgres, worker and the primary. Now everything except redis has a crash status and you can't log into n8n. In principle, it's not a problem, I created a new space. But in the old space there is a workflow that I worked on for two weeks. This is my first working large workflow. How can I restore access or make a database dump and get the workflow from it?
Errors:
Primary - Connection terminated due to connection timeout
Worker - Connection terminated due to connection timeout
Postgres - 1. database files are incompatible with server.
2. The data directory was initialized by PostgreSQL version 17, which is not compatible with this version 16.10 (Debian 16.10-1.pgdg13+1)
And under "data" section - Deployment Online. This service requires a deployment to be online
Status changed to Open angelo-railway • 13 days ago
franceskora
The Problem: A PostgreSQL DowngradeThe key error is this one:"The data directory was initialized by PostgreSQL version 17, which is not compatible with this version 16.10"This means your database files (which are safe on the persistent volume) were created by PostgreSQL 17. When you clicked "update," Railway tried to deploy the latest stable version of its PostgreSQL template, which is 16.10.The Recovery Plan: Forcing PostgreSQL 17We can fix this by telling Railway to use the correct PostgreSQL 17 engine for your existing data. We will convert your PostgreSQL service from a managed template to a custom Docker image.1. Go to Your Broken PostgreSQL ServiceNavigate to your old project on Railway and click on the PostgreSQL service that is crashing.2. Change the Service SourceGo to the "Settings" tab of the PostgreSQL service.In the "Service" section, look for an option to "Change Source" or "Detach from Template."Choose to deploy from a Docker Image.3. Specify the Correct Docker ImageIn the "Image Name" field that appears, enter the correct version exactly: postgres:17Click "Update" or "Deploy."4. Verify Your SettingsAfter changing the source, quickly double-check two things:Variables: Make sure all your original database environment variables (POSTGRES_USER, POSTGRES_DB, POSTGRES_PASSWORD) are still there.Volumes: Make sure your persistent volume is still attached with the correct mount path (usually /var/lib/postgresql/data).5. Redeploy All ServicesOnce you've set the PostgreSQL image to postgres:17, trigger a manual redeploy of your n8n primary and worker services. This will force them to try and reconnect.Because the database will now be running the correct version (17), it will be able to read its data and start up successfully. This will allow your n8n services to connect, and you should regain access to your instance.Once You Regain AccessThe first thing you should do is export your important workflow as a JSON file and save it to your computer. You can then import this file into your new, clean project to be safe.
13 days ago
Thank you so much!!
Status changed to Solved brody • 13 days ago
11 days ago
Now it work properly. And after i bought and linked an domain name it ok with google accounts now. Of course ive done as much mistkes as it possible nad the last one that i bought domain name from godaddy and it is not that as simple as i touht but with i this manual (https://docs.railway.com/guides/public-networking#redirecting-a-root-domain-workarounds) finaly it began to work.
Status changed to Awaiting Railway Response Railway • 11 days ago
Status changed to Solved chandrika • 11 days ago