octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
816 stars 181 forks source link

Issues registering device over raw WebSocket #112

Closed RickCarlino closed 8 years ago

RickCarlino commented 8 years ago

I was transferring some older Socket.io code over to the newer raw WS interface and hit some 401 errors when trying to register:


var ws = new WebSocket("wss://meshblu.octoblu.com/ws/v2");

ws.onopen = function() {
  ws.send(
      JSON.stringify(["register", {}])
      );
};

ws.onmessage = function(e) { console.dir(e.data); };

The following code snippet will return:

["error",{"message":"unauthorized","frame":["register",{}],"status":401}]

Did I do something wrong while registering or is this an internal issue? The code above is more or less a copy/paste job from the documentation, so I wasn't sure.

ADDITIONAL INFO: The snippet above does not appear to emit a "ready" event. Even if I just connect.

iamruinous commented 8 years ago

Fixed in 5a12501