Skip to content

Driver exits without error with bad credentials #185

Closed
@rvazarkar

Description

@rvazarkar

The nodejs driver does not return any sort of error message if bad credentials are provided to the database for authentication.

A simple way to reproduce this is as follows:

var neo4j = require('neo4j-driver').v1;

var driver = neo4j.driver('bolt://localhost', neo4j.auth.basic("neo4j", "Ireallyhopethisisntyourpassword"));
var session = driver.session();

session.run('MATCH (n) RETURN n LIMIT 1')
    .subscribe({
        onNext: function(record) {
            console.log(record)
            console.log("onnext")
        },
        onCompleted: function() {
            console.log("complete")
            session.close()
            driver.close()
        },
        onError: function(error) {
            console.log(error)
            console.log("error")
        }
    })

If you fix the password provided in the auth.basic, you will correctly get a record (provided you have a record in your db). With an incorrect password, nothing is returned or logged. The driver should ideally at least return some sort of message if the connection was unable to be established due to authentication problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions