-
Notifications
You must be signed in to change notification settings - Fork 62
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
Error: Expected Stream, got object #91
Comments
Are you positive the server you're connecting to is up and running? |
Sorry, my mistake.. Server was not up and running properly. Thanks for the assistance |
Glad I could help. Maybe we should make that error more clear. |
I am coming across the same error. My server is running and returning a response.
The server returns an object and somewhere deep down in the call stack the stream library throws an error because it does not expect this object. Edit: Using Tinkerpop Gremlin Server 3.3.0 |
Tomen, I am having the same error as you. My tinkerpop is 3.3.0 as well. I am able to connect with the java-based gremlin console, but get the same error as you from Node.js. I have a lot of tracing on in the gremlin-server and I can see that the expression "g.V()" is received and it at least begins to evaluate. My vesion of Node.js v6.11.1 Did you figure it out? |
jbmusso, I was wondering if the serialization is always GraphSON, or does this do Gryo, or both, selectably? Thanks. |
I spent about 3 hours trying to figure out what is going on. I might be able to post some intermediary results tonight. I think it has to be something simple, like a configuration issue, since this is concerning basic app functionality. I was also thinking that it might have to do with the server response format or that the issue relates to some version incompatibility. /ping @JoeNemo |
@JoeNemo The serialization is always GraphSON but this could be made configurable with some work. |
At the end of this comment I will post the complete call stack to the error. So assume you have some vertices or anything that returns an actual result and does not go over to 204 No Content.
By now, the rawMessage object looks like this: https://gist.github.com/Tomen/c1ec4e0b15cf7aa61f448455905c6447 (this is a stringified version of the object) The stream does its work and deepeer down the stack we meet After that, I think the sequence portion of the stream shall be handled and this is where the error occurs. In index.js line 3457 the method So from my point of view defaultExecuteHandler() maps the object (sets the objectMode boolean) and after that when sequence() is called an exception is thrown.
|
It has something to do with the version of Tinkerpop Gremlin Server. I just tried Tinkerpop Gremlin Server 3.2.6 and it worked! |
Here is a diff of the 3.2.6 format (left) and the 3.3.0 format (right): https://www.diffchecker.com/V8dE9kCt they changed the way how they render lists. |
Just a heads up, seeing this with AWS' new Neptune service that is still in beta. The data I'm getting back is definitely the "g:List" type on the right hand side of @Tomen's diff. Still new to the Gremlin space, but it sounds like this is related to Serialization, right? |
You're right and this is related to serialization format, which this library doesn't support yet. That's a bit of work that will be addressed by the upcoming official JavaScript GLV which was merged into master: apache/tinkerpop#695. |
Trying to connect to either a Janus database, Tinkergraph Database or OreintDB. In each case I have managed to connect a gremlin server to the database. I am able to connect to the gremlin server with the gremlin console and can traverse the records. However I am unable to do so with gremlin-javascript.
If you could add some insight to what I am doing wrong it would be muchly appreciated.
simple code I am using:
the error stack: (Including the console.log of the client):
The text was updated successfully, but these errors were encountered: