{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/7640","repository_url":"https://api.github.com/repos/neo4j/neo4j","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/7640/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/7640/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/7640/events","html_url":"https://github.com/neo4j/neo4j/issues/7640","id":167480142,"number":7640,"title":"Can't send BYTES type using Bolt protocol","user":{"login":"bost-h","id":4355859,"avatar_url":"https://avatars.githubusercontent.com/u/4355859?v=3","gravatar_id":"","url":"https://api.github.com/users/bost-h","html_url":"https://github.com/bost-h","followers_url":"https://api.github.com/users/bost-h/followers","following_url":"https://api.github.com/users/bost-h/following{/other_user}","gists_url":"https://api.github.com/users/bost-h/gists{/gist_id}","starred_url":"https://api.github.com/users/bost-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bost-h/subscriptions","organizations_url":"https://api.github.com/users/bost-h/orgs","repos_url":"https://api.github.com/users/bost-h/repos","events_url":"https://api.github.com/users/bost-h/events{/privacy}","received_events_url":"https://api.github.com/users/bost-h/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-25T22:24:45Z","updated_at":"2016-07-26T08:17:19Z","closed_at":null,"body":"I tried to create a node with the python bolt driver, and I passed a `bytearray([42])` as a query parameter, then I got `neo4j.v1.exceptions.ProtocolError: Server closed connection`.\r\nI did the same with a homemade golang driver, the server also shutdowns the connection, but very occasionally I get a `Neo.ClientError.Request.InvalidFormat: Unknown value type: BYTES`.\r\n\r\nI don't think the issue comes from drivers, I inspected the packstream encoded data and it is well formed (`0xcc 0x01 0x2a` for a `bytearray([42])`)\r\n\r\n**Neo4j Version:** 3.0.3\r\n**Operating System:** I am using the official docker image tagged `latest`, which is currently the `3.0.3`\r\n**API:** I am testing with a homemade golang driver but i confirmed the behaviour with the python driver https://github.com/neo4j/neo4j-python-driver\r\n\r\n### Steps to reproduce\r\n1. Install the python driver https://github.com/neo4j/neo4j-python-driver\r\n2. Launch a Neo4j 3.0.3 server\r\n3. Run the following code\r\n```python\r\nfrom neo4j.v1.session import GraphDatabase, basic_auth\r\n\r\n\r\ndriver = GraphDatabase.driver(\"bolt://localhost\", auth=basic_auth(\"neo4j\", \"neo4j\"))\r\nsession = driver.session()\r\n\r\nresult = session.run(\"CREATE (n {data: {data}})\", {\"data\": bytearray([42])})\r\nsession.close()\r\n```\r\n\r\n### Expected behaviour\r\nThe node should be created with no errors, and we should be able to pass binary data as a parameter\r\n\r\n### Actual behaviour\r\nMost of times I got a `neo4j.v1.exceptions.ProtocolError: Server closed connection`, but very occasionally I got a `Neo.ClientError.Request.InvalidFormat: Unknown value type: BYTES`.\r\nThe node is not created."},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/235194395","html_url":"https://github.com/neo4j/neo4j/issues/7640#issuecomment-235194395","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/7640","id":235194395,"user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T08:17:19Z","updated_at":"2016-07-26T08:17:19Z","body":"I believe the driver is working as intended for the most part here (the error message could be clearer at the very least).\r\n\r\nIf you look at http://neo4j.com/docs/developer-manual/current/#driver-types\r\nyou can see what types are supported by the drivers/neo4j. Neo4j has no type which maps to bytes/binary/raw.\r\n\r\nI've labeled the issue as a feature request for a binary type. Does that sound reasonable?"}}
{"actor":{"display_login":"spacecowboy"}}