Skip to content

Cannot read property 'length' of null #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brian-gates opened this issue Jul 26, 2016 · 1 comment
Closed

Cannot read property 'length' of null #115

brian-gates opened this issue Jul 26, 2016 · 1 comment

Comments

@brian-gates
Copy link
Contributor

brian-gates commented Jul 26, 2016

$ cat test.js 
var neo4j = require('neo4j-driver').v1;

var driver = neo4j.driver("bolt://localhost");
// Create a session to run Cypher statements in.
// Note: Always make sure to close sessions when you are done using them!
var session = driver.session();

// Run a Cypher statement, reading the result in a streaming manner as records arrive:
session
  .run("MERGE (alice:Person {name : {nameParam} }) RETURN alice.name", { nameParam:'Alice' })
  .subscribe({
    onNext: function(record) {
     console.log(record._fields);
    },
    onCompleted: function() {
      // Completed!
      session.close();
    },
    onError: function(error) {
      console.log(error);
    }
  });


$ node test.js 
.../neo4j-driver/lib/v1/internal/ch-node.js:214
      for (var i = 0; i < pending.length; i++) {
                                 ^

TypeError: Cannot read property 'length' of null
    at .../neo4j-driver/lib/v1/internal/ch-node.js:214:34
    at .../neo4j-driver/lib/v1/internal/ch-node.js:141:11
    at Interface.<anonymous> (.../neo4j-driver/lib/v1/internal/ch-node.js:76:7)
    at emitOne (events.js:77:13)
    at Interface.emit (events.js:169:7)
    at Interface._onLine (readline.js:210:10)
    at Interface.<anonymous> (readline.js:340:12)
    at Array.forEach (native)
    at Interface._normalWrite (readline.js:339:11)
    at ReadStream.ondata (readline.js:86:10)

$ curl localhost:7474/db/data/
{
  "extensions" : { },
  "node" : "http://localhost:7474/db/data/node",
  "relationship" : "http://localhost:7474/db/data/relationship",
  "node_index" : "http://localhost:7474/db/data/index/node",
  "relationship_index" : "http://localhost:7474/db/data/index/relationship",
  "extensions_info" : "http://localhost:7474/db/data/ext",
  "relationship_types" : "http://localhost:7474/db/data/relationship/types",
  "batch" : "http://localhost:7474/db/data/batch",
  "cypher" : "http://localhost:7474/db/data/cypher",
  "indexes" : "http://localhost:7474/db/data/schema/index",
  "constraints" : "http://localhost:7474/db/data/schema/constraint",
  "transaction" : "http://localhost:7474/db/data/transaction",
  "node_labels" : "http://localhost:7474/db/data/labels",
  "neo4j_version" : "3.0.3"
}


neo4j.log

2016-07-26 23:06:26.534+0000 ERROR Client triggered an unexpected error [UnknownError]: null. See debug.log for more details, reference 70b41b21-9f53-42c2-b022-5d073f1ebd27.

debug.log

2016-07-26 23:12:42.571+0000 ERROR [o.n.b.v.t.BoltProtocolV1] Failed to write response to driver
java.lang.NullPointerException
        at org.neo4j.bolt.v1.transport.ChunkedOutput.ensure(ChunkedOutput.java:156)
        at org.neo4j.bolt.v1.transport.ChunkedOutput.writeShort(ChunkedOutput.java:90)
        at org.neo4j.bolt.v1.packstream.PackStream$Packer.packStructHeader(PackStream.java:304)
        at org.neo4j.bolt.v1.messaging.PackStreamMessageFormatV1$Writer.handleSuccessMessage(PackStreamMessageFormatV1.java:145)
        at org.neo4j.bolt.v1.messaging.msgprocess.MessageProcessingCallback.completed(MessageProcessingCallback.java:102)
        at org.neo4j.bolt.v1.messaging.msgprocess.MessageProcessingCallback.completed(MessageProcessingCallback.java:31)
        at org.neo4j.bolt.v1.runtime.internal.SessionStateMachine.after(SessionStateMachine.java:823)
        at org.neo4j.bolt.v1.runtime.internal.SessionStateMachine.pullAll(SessionStateMachine.java:666)
        at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorkerFacade.lambda$pullAll$4(SessionWorkerFacade.java:74)
        at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorkerFacade$$Lambda$173/1688248860.accept(Unknown Source)
        at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorker.execute(SessionWorker.java:116)
        at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorker.executeBatch(SessionWorker.java:102)
        at org.neo4j.bolt.v1.runtime.internal.concurrent.SessionWorker.run(SessionWorker.java:82)
        at java.lang.Thread.run(Thread.java:745)
@jgkim
Copy link

jgkim commented Jul 27, 2016

This issue is duplicate with #108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants