N8n.io Desktop Youtube API 504 Gateway timeout

Attempting to authorize the YouTube OAuth2 Api seems to fail on mac OSX Monterey 12.0.1. Although the process works seamlessly on the web the desktop version leads to a 504 Gateway timeout after successfully logging in with a google account from the “Sign in with Google” button in the credentials page. Are others having this issue?

I solved this by re-installing the app…
for some reason the desktop app created a bad redirect URL which originally was:
https://(someword)-(someword)-(somenumber).hooks.n8n.cloud/rest/oauth2-credential/callback

on re-install it changed to:
https://(longrandomnumber).hooks.n8n.cloud/rest/oauth2-credential/callback

and this fixed the issue.

2 Likes

Thank you for sharing the solution.

This comes from standard n8n. On init, n8n looks for the tunnel subdomain in the env var TUNNEL_SUBDOMAIN_ENV, else in the tunnelSubdomain key in ~/.n8n/config, else it creates a random string and stores it in the tunnelSubdomain key, and uses this when creating the tunnel.

The problem is that, when localtunnel is interrupted, it can fail to release the subdomain, so creating a tunnel with an existing subdomain results in a new subdomain in the format {adjective}-{noun}-{number}, which is set by the localtunnel server. This is an open issue in the localtunnel lib. As a workaround, you can change your subdomain in the tunnelSubdomain key to a new one, or delete it so that you receive a new random string on init.

4 Likes