I’m trying to connect to an OAuth account (doesn’t matter what account), and get the title error:
The point is that this error only occurs on my computer. Not browser, computer. I tried with 3 different browsers and get the same error, but I tried on another computer and works fine…
Can anyone have any idea of what can be happening??? I’m going crazy because I can’t create new credentials using my computer…
The credentials are for Google and Gitlab, and the instance is self-hosted on a VPS (sorry, I forgot to mention this).
The credentials (client and secret) of both services are correct, because I can create connections from another computer. I tried to install a new browser that I never used before, and get the same error…
That is very odd, I would expect the client and secret to be right but I am not why you would see that message. Does the redirect URI look right for the credential in n8n? Does anything show in the browser console log as well?
I guess the only other thing to think about is what is different between your computer and the one that works. Different network / vpn maybe?
I have Firefox Containers to separate my personal data from my work data, and I tried to access to my n8n instance with my work container, and surprise, it works, but only a few times. After that, I just clear all my browser data because I suspect that can be some problem with the cookies or something, and after that I get the error 500 again.
So, I don’t know what can be happening here… I tried to reset my instance (I’m on a Docker instance), but nothing…
I will try from another friend’s computer today or tomorrow just to check from another machine and network, but I’m going crazy
This instance works fine from my work computer, but not from my personal.
So, at this point I can only create OAuth connections from my work computer, for some reason I don’t know, because it’s the device that can be more limited in terms of network.
I don’t know what can be the problem or how can do more tests to found it.
Here is the docker-compose. Both instances have the same, but one has ports as defined here and the other just expose to an internal IP (XX.XX.XX.XX:5678:5678):
# The top level domain to serve from
DOMAIN_NAME=mydomain.com
# The subdomain to serve from
SUBDOMAIN=n8n
# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in: https://n8n.example.com
# The user name to use for authentication - IMPORTANT ALWAYS CHANGE!
N8N_BASIC_AUTH_USER=mysuperuser
# The password to use for authentication - IMPORTANT ALWAYS CHANGE!
N8N_BASIC_AUTH_PASSWORD=mysuperpassword
# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Madrid
One of the instances is on Azure and the other on Hetzner; both are behind a NPM with the same configuration too, but I don’t think that’s the problem, because I tried directly through the IP:port (without domain, and adapting the docker compose, of course), and nothing changes.
EDIT: I tried to add another OAuth2 accounts, just putting random ID and Secrets, and all returns the same error. So, the values seem not relevant, and it’s like if the url request to the service is not generating well, but the strange thing is that depending on the browser works or not.
If you need another information, I can try to send to you
Thanks a lot again for your time! I hope we can find the problem
As suspect, is with the cookies. We have n8n behind NPM, AND Authelia to access to the front-end (and just bypass webhooks and rest endpoints). As we need to log in first with Authelia, the cookie of the session is associated to authelia (Cookie: authelia_session=XXXXXXXX), but for some reason, my work computer has a cookie stored to n8n (I don’t know why. Cookie: n8n-auth=XXXXXXXXX). As all new devices get the authelia cookie, this causes that n8n can’t resolve this session and generate (validate, I think) the url.
I removed the Authelia step and all works.
For now, our workaround will be deactivated Authelia when we need to create new credentials, meantime we investigate the proper configuration for Authelia.
Sorry for all of this confusion, and thank you so much for your patience.