neo4j-javascript-driver icon indicating copy to clipboard operation
neo4j-javascript-driver copied to clipboard

`TLS ServerName` deprecation warning when connecting to IP addresses

Open wthrajat opened this issue 5 days ago • 1 comments

Description

When connecting to Neo4j/Memgraph using an IP address (e.g., bolt://12.34.56.78:7687), Node.js emits a deprecation warning:

(node:30) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.

Stack Trace

at Object.TRUST_ALL_CERTIFICATES (/node_modules/neo4j-driver-bolt-connection/lib/channel...)
at Object.connect (node:_tls_wrap:1811:15)
at _connect (/node_modules/neo4j-driver-bolt-connection/lib/channel/node/node-channel.js...)

Reproduction Steps

Configure driver with IP address:

const driver = neo4j.driver(
  'bolt://12.34.56.78:7687',
  neo4j.auth.basic('username', 'password')
);

Make any query, the error/warning appears in console in production logs.

Environment

Driver Version: "neo4j-driver": "^5.26.0",
Node version v20.11.1

wthrajat avatar Dec 10 '25 13:12 wthrajat