synchrony / smsn-mode

Emacs client for Semantic Synchrony knowledge graphs
GNU General Public License v3.0
11 stars 6 forks source link

request failed: Unrecognized field \"maxSharability\" #20

Closed rsuhada closed 7 years ago

rsuhada commented 7 years ago

I'm running the docker install. I run the test:

curl -i -N -vv -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: $host" -H "Origin: http://$host" -k "http://$host:$port/gremlin"
  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 8182 (#0)

    GET /gremlin HTTP/1.1 Host: localhost User-Agent: curl/7.47.0 Accept: / Connection: Upgrade Upgrade: websocket Origin: http://localhost

    < HTTP/1.1 101 Web Socket Protocol Handshake HTTP/1.1 101 Web Socket Protocol Handshake < Upgrade: WebSocket Upgrade: WebSocket < Connection: Upgrade Connection: Upgrade < WebSocket-Origin: http://localhost WebSocket-Origin: http://localhost < WebSocket-Location: ws://localhost/gremlin WebSocket-Location: ws://localhost/gremlin

Is this expected? I assume yes. My Emacs config:

(defvar brain-server-host "127.0.0.1") (defvar brain-server-port 8182) (defvar brain-server-protocol "websocket")

I now open scratch, M-x brain-mode, then C-cn, but get this error:

Error (websocket): in callback on-message': error: "request failed: Unrecognized field \"maxSharability\" (class net.fortytwo.smsn.brain.model.Filter), not marked as ignorable (4 known properties: \"defaultWeight\", \"minSharability\", \"defaultSharability\", \"minWeight\"]) at [Source: {\"action\":\"net.fortytwo.smsn.server.actions.GetView\",\"filter\":{\"minSharability\":0.25,\"maxSharability\":1.0,\"defaultSharability\":0.5,\"minWeight\":0.0,\"maxWeight\":1.0,\"defaultWeight\":0.5},\"root\":\"create-new-atom\",\"height\":2,\"style\":\"forward\"}; line: 1, column: 106] (through reference chain: net.fortytwo.smsn.server.actions.GetView[\"filter\"]->net.fortytwo.smsn.brain.model.Filter[\"maxSharability\"])" Error (websocket): in callbackon-message': error: "request failed: Unrecognized field \"maxSharability\" (class net.fortytwo.smsn.brain.model.Filter), not marked as ignorable (4 known properties: \"defaultWeight\", \"minSharability\", \"defaultSharability\", \"minWeight\"]) at [Source: {\"action\":\"net.fortytwo.smsn.server.actions.GetView\",\"filter\":{\"minSharability\":0.25,\"maxSharability\":1.0,\"defaultSharability\":0.5,\"minWeight\":0.0,\"maxWeight\":1.0,\"defaultWeight\":0.5},\"root\":\"create-new-atom\",\"height\":2,\"style\":\"forward\"}; line: 1, column: 106] (through reference chain: net.fortytwo.smsn.server.actions.GetView[\"filter\"]->net.fortytwo.smsn.brain.model.Filter[\"maxSharability\"])"

Do you know what is going wrong here?

If I set the server to

(defvar brain-server-host "fortytwo.net")

after hitting C-c n connection opens and closes immediately, nothng else happens.

Thank you!

JeffreyBenjaminBrown commented 7 years ago

I suspect smsn-mode is telling smsn about maxSharability, which was removed from smsn recently and maybe not from the master branch of smsn-mode. If you check out the develop branch of smsn mode (git checkout develop) that might do the trick. (Then restart Emacs. You won't have to restart smsn.)

rsuhada commented 7 years ago

Thank you! That does seem to fix it!

joshsh commented 7 years ago

Thanks, @JeffreyBenjaminBrown. Indeed, we can't combine master smsn-mode with develop smsn. In the future, would it be possible to maintain two docker images -- release master and latest develop? That will make it easier for users to choose between stable release software and the bleeding edge.

JeffreyBenjaminBrown commented 7 years ago

I'm on it.