Self-host [email protected] login page error

Self-Hosted n8n (v1.120.4) Fails to Load in Browser with Cannot read properties of undefined (reading 'ldap') TypeError

description:

Issue: I self-hosted n8n version 1.120.4 using Docker. The container logs confirm the server is running successfully. However, when attempting to access the application via http://<my-ip>:5678, the browser page fails to load, and the developer console shows the following error:

router-BjlAR2wH.js:1370  TypeError: Cannot read properties of undefined (reading 'ldap')
    at Proxy.initialize (sso.store-BN_yDmsC.js:16:22)
    at Proxy.wrappedAction (useTelemetry-BTUGwy7s.js:563:14)
    at initializeCore (router-BjlAR2wH.js:389:11)
    at async router-BjlAR2wH.js:1345:3

The n8n log

Initializing n8n process
n8n ready on ::, port 5678
n8n Task Broker ready on 127.0.0.1, port 5679

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:
 - EXECUTIONS_PROCESS -> Remove this environment variable; it is no longer needed.
 - N8N_BLOCK_ENV_ACCESS_IN_NODE -> The default value of N8N_BLOCK_ENV_ACCESS_IN_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/
 - N8N_GIT_NODE_DISABLE_BARE_REPOS -> Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N_GIT_NODE_DISABLE_BARE_REPOS=true. Learn more: https://docs.n8n.io/hosting/configuration/environment-variables/security/

[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner "JS Task Runner" (C65snSeVPIoyJsi7IWLx_) 
Version: 1.120.4

Editor is now accessible via:
http://<my-ip>:5678
(node:6) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Version 1.118.2 works correctly

Crucially, switching the Docker image back to version 1.118.2 resolves the issue completely, and the application loads and runs normally in the browser.

Information on your n8n setup

  • n8n version: 1.120.4
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Server is ubuntu, client is Windows 11
4 Likes

Yeah I’m also facing the same exact issue.

I reported this on GitHub, and was directed to post here instead. Does anyone know how to fix this?

It works fine when I connect to localhost:5678, but when I try 0.0.0.0:5678 or my-custom-host:5678, I get the same error as in the original post.

1 Like

same problem

Solution for n8n 1.120+ “Error connecting” / Blank Page Issue

If you’re getting a blank page or “Error connecting to n8n” after upgrading to 1.120+, this is likely due to the new SSO initialization requiring config vars that don’t exist in your setup.

Diagnose: Open browser console (F12) and look for:

TypeError: can't access property "ldap", options.config is undefined

Fix: Add these 3 environment variables to your docker-compose.yml:

environment:
  - N8N_SSO_SAML_ENABLED=false
  - N8N_SSO_OIDC_ENABLED=false  
  - N8N_SSO_LDAP_ENABLED=false

Then restart:

docker-compose down && docker-compose up -d

Why it works: n8n 1.120+ introduced SSO features that attempt to initialize even if you’re not using them. These flags explicitly disable SSO initialization, preventing the crash. Your existing email/password authentication remains unaffected and secure.

1 Like

Thank you very much. It really works.

2 Likes

How nice to hear that!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.