Neo4j Js Driver V 4.0.2 & 4.1.2 Support


When I try using the Neo4j Js driver to connect to Memgraph, I get the following error message:

*Database configuration Error: *
ailed to connect to server. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0. Caused by: Server certificate is not trusted. If you trust the database you are connecting to, use TRUST_CUSTOM_CA_SIGNED_CERTIFICATES and add the signing certificate, or the server certificate, to the list of certificates trusted by this driver using neo4j.driver(.., { trustedCertificates:['path/to/certificate.crt']}). This is a security measure to protect against man-in-the-middle attacks. If you are just trying Neo4j out and are not concerned about encryption, simply disable it using encrypted=“ENCRYPTION_OFF”` in the driver options. Socket responded with: DEPTH_ZERO_SELF_SIGNED_CERT
Application will now exit!

I get the same result with both Js drivers v4.0.2 and 4.1.2.

Any suggestions?


Hi, first of all thank you for reporting this!

Currently, the newest version of Memgraph, v1.1, is not compatible with the newer Neo4j drivers, including the JS ones so you should be using an older version of the driver (< 1.6).

Also, you can expect the new version of Memgraph, 1.2, soon (sometimes next week most likely) which will support the newest versions of all Neo4j drivers.
We are not sure right now what is causing the problem but it most likely has to do with their changes to the default configurations. Befaure, the default TrustStrategy was TRUST_ALL_CERTIFICATES and now it’s TRUST_SYSTEM_CA_SIGNED_CERTIFICATES. The solution would probably be a matter of correct configuration, but we’ll have a more concrete answer after we release new Memgraph.

1 Like

@toni thanks a lot for the reply! Looking forward to the new release :slight_smile:

1 Like

@alex.m12 sorry for the wait!
You can download newest version at
It should work with all the newest Neo4j drivers.
Try it out and tell us if something isn’t working as it should. :smiley:

1 Like