You upgraded n8n, opened the editor, and a red box says Error connecting to n8n. Could not connect to server. Refresh to try again. That box is the editor failing to reach its backend. It is not a diagnosis, and the cause is one line above it. Four GitHub issues from 2025 (n8n 1.88, 1.104, 1.109 and 1.120) show the same box with four different causes, and 226 comments between them. Run these checks in order.
Check 1: open the browser console (F12) and read the first error
What you see decides which of the four you are:
| First console or log line | Likely cause, per the thread | Where |
|---|---|---|
[WebSocketClient] Connection lost, code=1008 | The push connection was refused: your reverse proxy sends n8n a different Host or Origin than the browser did | #14653, 1.88.0 |
a request to /undefinedrest/settings (404) | N8N_PATH set, and /rest/config.js served without the path prefix | #17817, 1.104.2 |
401 on /rest/events/session-started, /rest/module-settings or /rest/login | a release-specific regression; reporters went back a version | #19151, 1.109.1 |
TypeError: Cannot read properties of undefined (reading 'ldap') | a login-page error on 1.120.3 and 1.120.4; one reporter says it happens even with N8N_SSO_*_ENABLED=false | #22063, 1.120.3 |
Check 2: if it is code=1008, compare Origin with Host in your proxy
In #14653 commenters traced it to a push-connection origin check added around 1.88. Fixes as posted in the thread:
- a
/rest/pushlocation block of its own withproxy_set_header Host $http_host;andproxy_set_header Origin $scheme://$http_host;(oilycn, 21 April 2025); later commenters quote it and say it fixed it ("Worked like charm", "this line was the real fix"). The full walkthrough is in the previous post; - set
HostandOriginexplicitly instead of with$host(adshrc, 16 April 2025); - include the port in
Originif you serve on a non-standard one: in the closing comment (15 August 2025) an n8n team member wrote that the port is optional on 80 and 443 and, on a non-standard port, "I would expect the port to be needed as well".
In the n8n log, later versions print Origin header does NOT match the expected origin; a commenter on 1.114.4 still reached it in October. Read that line before you change a header: it prints both sides of the comparison.
Check 3: if it is /undefined…, look at N8N_PATH
In #17817 the editor requested /undefinedrest/settings because /rest/config.js was served without the path prefix. Home Assistant add-on users were among those hit. A maintainer posted a test image the same day; a collaborator wrote that the fix had been left out of 1.104.2 and would ship in 1.105.1, and one reporter still saw it on 1.107.3. Check curl -I https://<your-host>/<your-path>/rest/config.js returns the script, not an HTML page.
Check 4: if it is a 401 or the ldap TypeError, check the version before the config
Reporters in #19151 and #22063 describe an unchanged docker-compose.yml, and the fastest fix in both threads was another version number:
- #19151: reporters went back to 1.108.2 and it worked; the author's closing confirmation is 1.110.1, and four reporters confirm 1.111.0 or the latest (1.109.2 did not fix it).
- #22063: only 1.119.1 worked for the reporters; two say pinning 1.121.2 worked for them, while a contributor wrote on 26 November that no fix had been deployed, only extra logging. One reporter's console says the origin "was untrustworthy" over plain HTTP on a LAN address. On 1 December a reply says they could not reproduce it on current versions, and a reporter confirms rebuilding the container after pulling the latest fixed it.
Check 5: before the next upgrade
- Pin the image tag instead of
latest, so the version you roll back to is written down. - Search the open and recently closed issues for the version you are moving to before you pull.
The four threads, as evidence
| Issue | Opened | Closed | Comments |
|---|---|---|---|
| #14653 "Connection lost after upgrade to 1.88.0" | 2025-04-15 | 2025-08-15, not planned | 80 |
| #17817 "1.104.2: Error connecting to n8n" | 2025-07-30 | 2025-08-08, completed | 32 |
| #19151 "Error connecting to n8n Could not connect to server after update to 1.109.1" | 2025-09-03 | 2025-09-08, completed | 67 |
| #22063 "Cannot Login to n8n after update to Version 1.120.3" | 2025-11-20 | 2025-12-01, not planned | 47 |
Two of the four closed as completed; the other two closed as not planned, after 80 and 47 comments. For the two closed as completed the fix came in a later release than the one that broke it (1.105.1 and 1.111.0); the other two closed with no fix named.
Where this comes from
Every thread in the table links to its GitHub source. n8n's page on Friction holds 39 reports from 80 public threads, each linked to its source, and cites three of these four (#14653, #19151, #22063) in its Self-hosting & upgrades area. What is stored and how to dispute a report: the data page. Free with an account: watch n8n and get an email when a new report is added.
The one question the four threads leave open: in #19151 and #22063 reporters got back to working by changing a version number, not a setting, and neither thread says what changed in the release. If you moved between these versions, which console line did you get first, and what did you roll back to? Reply with your version pair and the line.
From Friction, by Grain64.



