Skip to content

Connection and update headers required #23

@ghost

Description

I have the gem working locally without any snags, but I encountered an issue trying to run the app on my cloud development environment.

In the browser, I see this error:

WebSocket connection to 'ws://ruby-on-rails-192116.nitrousapp.com/' failed: Error during WebSocket handshake: Unexpected response code: 500

In my Sinatra server logs, I see this:

2016-07-06 18:47:46 - EventMachine::WebSocket::HandshakeError - Connection and Upgrade headers requir
ed:
        /home/nitrous/vidstream/.bundle/gems/em-websocket-0.3.8/lib/em-websocket/handler_factory.rb:7
3:in `build_with_request'
        /home/nitrous/vidstream/.bundle/gems/sinatra-websocket-0.3.1/lib/sinatra-websocket.rb:118:in
`dispatch'
        /home/nitrous/vidstream/.bundle/gems/sinatra-websocket-0.3.1/lib/sinatra-websocket.rb:22:in `
from_env'
        /home/nitrous/vidstream/.bundle/gems/sinatra-websocket-0.3.1/lib/sinatra-websocket/ext/sinatr
a/request.rb:17:in `websocket'

The only difference I know of is that on my local environment, the host is localhost, but on the cloud environment it is 0.0.0.0. Unless there is some dependency which I am forgetting to install to the cloud box.

I've tried to use https or wss, but haven't managed to find something that works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions