Closed RickCarlino closed 9 years ago
Hmm nothing that I know of has changed. If you use the meshblu npm module do you get the same problems?
We're actually using a Ruby based backend (via MeshRuby). What's strange is that MeshRuby appears to be connecting to the server just fine on the device side of things.
# Console log for our Ruby based device:
connect
identify {"socketid"=>"789"}
ready {"api"=>"connect", "status"=>201, "socketid"=>"789", "uuid"=>"123", "token"=>"456"}
The web frontend (part that's giving the errors) is running Socket.io 1.3.3
I will try doing a version up/down grade to see if that changes anything. Do you think 1.3.3 could be the issue?
I love ruby!
If it helps, there's a browserified version of the npm library
<script src="//cdn.octoblu.com/js/latest/meshblu.bundle.js"></script>
You can see it in use on developer console.
Ok, now I'm getting somewhere. Looks like that link causes the same problem as with socket.io:
WebSocket connection to 'wss://meshblu.octoblu.com/socket.io/?EIO=3&transport=websocket&sid=rwoLX133iEGufS_XAATO' failed: Error during WebSocket handshake: Unexpected response code: 502
I will dive a little deeper tomorrow and let you know what I find. Thanks for the help.
Ok, so here's what I've gotten so far:
Client (on Linux) | Results | message |
---|---|---|
Socket.io / Chrome 43 | :broken_heart: | WebSocket connection to 'wss://meshblu.octoblu.com/socket.io/?EIO=3&transport=websocket&sid=ggrF_xBNKgB2XDcqAAWf' failed: Error during WebSocket handshake: Unexpected response code: 502 |
MeshBlu.js / Chrome 43 | :yellow_heart: | Same Unexpected response code: 502 but still returns ready event (?) |
Socket.io / Firefox 37 | :yellow_heart: | The connection to wss://meshblu.octoblu.com/socket.io/?EIO=3&transport=websocket&sid=8Tq2M2riSLKt7KYtAAfm was interrupted while the page was loading. socket.io.js:5258:0 and Firefox can't establish a connection to the server at wss://meshblu.octoblu.com/socket.io/?EIO=3&transport=websocket&sid=wjZquv30UyRO8oLQAAWj. socket.io.js:5258:0 |
MeshBlu.js / Firefox 37 | :yellow_heart: | same as Socket.io |
MeshRuby (serverside socket.io client) | :green_heart: | Connects without issues. |
UPDATE: After leaving the FF window open for some time, I saw CORS header errors. Is it possible that CORS is misconfigured on the serverside? This might explain why my server app is having no issues connecting- it does not bother with Flash / JSONP / XHR transports and goes straight to a websocket connection. Can't confirm though. I will take a deeper look today.
@RickCarlino we are doing source IP mapping on the load balancer, do you have multiple outbound IPs?
We can do a GoToMeeting or you can join us in https://gitter.im/octoblu/help for a more real-time chat. I'd like to help you get this resolved today if possible.
@iamruinous I think that's what the issue might have been. Here's how I fixed it:
WSS://
Not sure what changed, or why I was able to get the instance running today and not 2 days ago, but I imagine it was either fixed in a recent PR, or when I tried this a few days ago there was an unseen misconfiguration on my part. Eitherway, this is enough to get me working again. Feel free to call me up or PM me on Twitter if you need help tracking down that 502
error.
@RickCarlino I just ran into @elbow-jason at Gangplank and we were chatting about these problems. We just released a pure websocket implementation yesterday to avoid all the socket.io problems people are having with non-javascript clients.
http://meshblu-websocket.readme.io/v2.0/docs/getting-started
It isn't the full API just yet but we're adding more to it every day. This could be a lot easier for you to implement.
Using the public MeshBlu server:
Produces the following error:
I provisioned my own server on
localhost
, which causes a stalled connection (no errors though) and a warning from chrome: CAUTION: Request is not finished yet!. Server logs do not show much information beyond that.Does anyone have any ideas about this? Has the socket API changed recently?
Thanks.