cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Google Clound Run Neo4jError: Unknown Bolt protocol version: 0

Hello! After scouring the web for solution, I am dumbfounded. Here is my problem:

I have a production server running on Google Cloud run. Basically a way for me to deploy a node server. This server connects to a Compute Engine VM that is hosting my neo4j database.

I wanted to create a staging site, so I cloned the VM image, and that worked surprisingly well. I then deployed a staging branch. That also went well. My problem comes on the connection to the Compute Engine VM from the Cloud run service. It is exactly the same configuration as my production setup. Furthermore, I can connect to my database from my local machine. If I host the server on my local machine, I can connect to the database just fine. But from the cloud run service, I keep getting the "Neo4jError: Unknown Bolt protocol version: 0" Error. I believe it is a problem with the driver. But my package.json, which controls the versioning is the same on my local, staging, and production environments.

I am just dumbfounded and wanted some input. I will keep banging my head away, but if you have any tips, let me know!

4 REPLIES 4

Hi and welcome!
What is the version of the Neo4j database running in Cloud Run and the version of the Javascript driver you are using?

Here is the stack trace if that may help:
Neo4jError: Unknown Bolt protocol version: 0

Default

2020-11-19 10:51:18.678 PST

Default

2020-11-19 10:51:18.678 PST

at captureStacktrace (/usr/src/app/node_modules/neo4j-driver/lib/result.js:277:15)

Default

2020-11-19 10:51:18.678 PST

at new Result (/usr/src/app/node_modules/neo4j-driver/lib/result.js:68:19)

Default

2020-11-19 10:51:18.678 PST

at newCompletedResult (/usr/src/app/node_modules/neo4j-driver/lib/transaction.js:449:10)

Default

2020-11-19 10:51:18.678 PST

at Object.run (/usr/src/app/node_modules/neo4j-driver/lib/transaction.js:287:14)

Default

2020-11-19 10:51:18.678 PST

at Transaction.run (/usr/src/app/node_modules/neo4j-driver/lib/transaction.js:123:32)

Default

2020-11-19 10:51:18.678 PST

at _callee2$ (/usr/src/app/node_modules/neo4j-graphql-js/dist/index.js:222:35)

Default

2020-11-19 10:51:18.678 PST

at tryCatch (/usr/src/app/node_modules/regenerator-runtime/runtime.js:63:40)

Default

2020-11-19 10:51:18.678 PST

at Generator.invoke [as _invoke] (/usr/src/app/node_modules/regenerator-runtime/runtime.js:293:22)

Default

2020-11-19 10:51:18.678 PST

at Generator.next (/usr/src/app/node_modules/regenerator-runtime/runtime.js:118:21)

Default

2020-11-19 10:51:18.678 PST

at asyncGeneratorStep (/usr/src/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)

Hey! and thanks for the response. Faster than I expected.
3.4.9 is my neo4j version
^4.0.1 is my neo4j-driver version. I am curious if the ^ has caused inconsistencies in the versioning. I will remove that and see what happens.

I believe the cloud run is the problem. I tried to connect my staging server to my prod database and got the same error. I can connect to my database from my local server, so I doubt the database is the problem. I will try to change the version and redeploy.

I am utterly speechless......

Apparently that was my problem. I have deployed the changes. The only change I made was removing the ^ from the version of the neo4j-driver in the package.json of the server.....

I read up on the meaning of the ^, and to my understanding it is only supposed to allow backwards-compatible updates. Does this mean that neo4j published a breaking change in a version that was not supposed to contain a breaking change?

Either way, Thank you very much for your time! and I hope this thread can help someone else in the future. If you get this mystical error, check your versioning about a million times haha

Have a great thanksgiving!

Ben