{"action":"created","issue":{"url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/51","repository_url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver","labels_url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/51/comments","events_url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/51/events","html_url":"https://github.com/johnnadratowski/golang-neo4j-bolt-driver/issues/51","id":335344870,"node_id":"MDU6SXNzdWUzMzUzNDQ4NzA=","number":51,"title":"Couldn't read expected bytes for message length. Read: 0 Expected: 2. Internal Error(*errors.errorString):driver: bad connection","user":{"login":"MrDHat","id":1485255,"node_id":"MDQ6VXNlcjE0ODUyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1485255?v=4","gravatar_id":"","url":"https://api.github.com/users/MrDHat","html_url":"https://github.com/MrDHat","followers_url":"https://api.github.com/users/MrDHat/followers","following_url":"https://api.github.com/users/MrDHat/following{/other_user}","gists_url":"https://api.github.com/users/MrDHat/gists{/gist_id}","starred_url":"https://api.github.com/users/MrDHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrDHat/subscriptions","organizations_url":"https://api.github.com/users/MrDHat/orgs","repos_url":"https://api.github.com/users/MrDHat/repos","events_url":"https://api.github.com/users/MrDHat/events{/privacy}","received_events_url":"https://api.github.com/users/MrDHat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-25T10:17:52Z","updated_at":"2018-06-26T23:19:18Z","closed_at":null,"author_association":"NONE","body":"I get this error whenever I am trying to query something from the db:\r\n\r\n`Couldn't read expected bytes for message length. Read: 0 Expected: 2.\r\nInternal Error(*errors.errorString):driver: bad connection`\r\n\r\nMy code worked fine until a couple of hours back. Nothing changed in my setup or code.\r\n`PreparePipeline`, `ExecPipeline` etc work fine and do not throw any errors. I am using neo4j with docker fwiw.\r\nHere is a sample test which is failing:\r\n\r\n```golang\r\n// Query executes a cypher query\r\nfunc Query(cypher string, params map[string]interface{}) ([]interface{}, error) {\r\n\tconn, err := instance.GetNeoPool()\r\n\tif err != nil {\r\n\t\treturn nil, err\r\n\t}\r\n\tstmt, err := conn.PrepareNeo(cypher)\r\n\tif err != nil {\r\n\t\treturn nil, err\r\n\t}\r\n\r\n\trows, err := stmt.QueryNeo(params)\r\n\tif err != nil {\r\n\t\treturn nil, err\r\n\t}\r\n\tvar res []interface{}\r\n\tfor err == nil {\r\n\t\trow, _, err := rows.NextNeo()\r\n\t\tif err != nil && err != io.EOF {\r\n\t\t\treturn nil, err\r\n\t\t} else if err != io.EOF {\r\n\t\t\tres = append(res, row)\r\n\t\t}\r\n\t}\r\n\tstmt.Close()\r\n\r\n\treturn res, nil\r\n}\r\n```\r\n\r\n```golang\r\nfunc TestQuery(t *testing.T) {\r\n\tConvey(\"Given a cypher\", t, func() {\r\n\t\tcypher := \"MATCH (n) RETURN n LIMIT {limit}\"\r\n\t\tparams := map[string]interface{}{\r\n\t\t\t\"limit\": 25,\r\n\t\t}\r\n\r\n\t\tConvey(\"it should execute the commands without any errors\", func() {\r\n\t\t\tres, err := Query(cypher, params)\r\n\t\t\tSo(err, ShouldBeNil)\r\n\t\t\tSo(res, ShouldNotBeNil)\r\n\t\t})\r\n\t})\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/comments/400492972","html_url":"https://github.com/johnnadratowski/golang-neo4j-bolt-driver/issues/51#issuecomment-400492972","issue_url":"https://api.github.com/repos/johnnadratowski/golang-neo4j-bolt-driver/issues/51","id":400492972,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDQ5Mjk3Mg==","user":{"login":"MrDHat","id":1485255,"node_id":"MDQ6VXNlcjE0ODUyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1485255?v=4","gravatar_id":"","url":"https://api.github.com/users/MrDHat","html_url":"https://github.com/MrDHat","followers_url":"https://api.github.com/users/MrDHat/followers","following_url":"https://api.github.com/users/MrDHat/following{/other_user}","gists_url":"https://api.github.com/users/MrDHat/gists{/gist_id}","starred_url":"https://api.github.com/users/MrDHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrDHat/subscriptions","organizations_url":"https://api.github.com/users/MrDHat/orgs","repos_url":"https://api.github.com/users/MrDHat/repos","events_url":"https://api.github.com/users/MrDHat/events{/privacy}","received_events_url":"https://api.github.com/users/MrDHat/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T23:19:18Z","updated_at":"2018-06-26T23:19:18Z","author_association":"NONE","body":"Anything here? I am facing this issue in production now even after the change mentioned above."}}
{"actor":{"display_login":"MrDHat"}}