Did you check the raw response, most of the responses are json wrapped in json and the inner json needs decoding after decoding the first json, and you might have a silent error?
Like so for logging everything the server sends to you?
ws.on('message', function(raw_data, flags) {
fs.appendFileSync(__dirname + '/messages.log', raw_data);