neo4j / neo4j-javascript-driver

Neo4j Bolt driver for JavaScript

Home Page:https://neo4j.com/docs/javascript-manual/current/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error connecting Neo4j 5.6 with neo4j-driver-bolt-connection 5.8.0

mklinger opened this issue · comments

Bug Report

When using neo4j-driver-bolt-connection 5.8.0 (due to version range in neo4j-driver dependency), connection to the database fails. Pinning the version to 5.7.0 fixes the problem.

Client side error:

Neo4jError: Unable to pack the given value: undefined
      at new Neo4jError (node_modules/neo4j-driver-core/lib/error.js:77:16)
      at newError (node_modules/neo4j-driver-core/lib/error.js:113:12)
      at Array.<anonymous> (node_modules/neo4j-driver-bolt-connection/lib/packstream/packstream-v1.js:329:52)
      at Packer.Object.<anonymous>.Packer.packStruct (node_modules/neo4j-driver-bolt-connection/lib/packstream/packstream-v1.js:164:30)
      at node_modules/neo4j-driver-bolt-connection/lib/packstream/packstream-v1.js:120:47
      at BoltProtocol.Object.<anonymous>.BoltProtocol.write (node_modules/neo4j-driver-bolt-connection/lib/bolt/bolt-protocol-v1.js:425:41)
      at BoltProtocol.Object.<anonymous>.BoltProtocol.logon (node_modules/neo4j-driver-bolt-connection/lib/bolt/bolt-protocol-v5x1.js:138:14)
      at BoltProtocol.Object.<anonymous>.BoltProtocol.initialize (node_modules/neo4j-driver-bolt-connection/lib/bolt/bolt-protocol-v5x1.js:113:21)
      at node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:265:29
      at ChannelConnection.Object.<anonymous>.ChannelConnection._initialize (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:264:16)
      at ChannelConnection.<anonymous> (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:231:51)
      at step (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:66:23)
      at Object.next (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:47:53)
      at node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:41:71
      at Object.<anonymous>.__awaiter (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:37:12)
      at ChannelConnection.Object.<anonymous>.ChannelConnection.connect (node_modules/neo4j-driver-bolt-connection/lib/connection/connection-channel.js:221:16)
      at AuthenticationProvider.<anonymous> (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/authentication-provider.js:88:57)
      at step (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/authentication-provider.js:51:23)
      at Object.next (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/authentication-provider.js:32:53)
      at fulfilled (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/authentication-provider.js:23:58)

Server side error:

2023-05-09 08:40:41.751+0000 ERROR [bolt-3] Terminating connection due to unexpected error
org.neo4j.bolt.protocol.error.streaming.BoltStreamingWriteException: Failed to transmit operation result: Response write failure
	at org.neo4j.bolt.protocol.common.fsm.response.NetworkResponseHandler.onSuccess(NetworkResponseHandler.java:184) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.after(AbstractStateMachine.java:112) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.fsm.AbstractStateMachine.process(AbstractStateMachine.java:88) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.lambda$submit$4(AtomicSchedulingConnection.java:121) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJob(AtomicSchedulingConnection.java:343) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.doExecuteJobs(AtomicSchedulingConnection.java:278) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at org.neo4j.bolt.protocol.common.connector.connection.AtomicSchedulingConnection.executeJobs(AtomicSchedulingConnection.java:220) ~[neo4j-bolt-5.6.0.jar:5.6.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: io.netty.channel.StacklessClosedChannelException
	at io.netty.channel.AbstractChannel$AbstractUnsafe.write(Object, ChannelPromise)(Unknown Source) ~[netty-transport-4.1.87.Final.jar:4.1.87.Final]

My Environment

Javascript Runtime Version: Node v18.13.0
Driver Version: neo4j-driver 5.7.0 with neo4j-driver-bolt-connection 5.8.0
Neo4j Version and Edition: Neo4j 5.6.0 enterprise
Operating System: Ubuntu 22.04.2 LTS

@mklinger , this issue is already solved in newer releases. You can re-open the issue if the problem persists.

See: https://github.com/neo4j/neo4j-javascript-driver/wiki/5.0-changelog#561
Or: https://github.com/neo4j/neo4j-javascript-driver/wiki/5.0-changelog#581

You can update to the latest driver version also.