The following error repeats for exactly 44 seconds on page load, and then finally the websocket connection will succeed. After that communication works fine. I'm running from the background javascript page of a chrome extension on same localhost. localhost is 64bit Ubuntu 14.04 LTS with Chrome 49
I don't understand why ssl is coming in to play at all? I've tried to set every relevant configuration on pusher fake server and javascript client to be unencrypted.
[16219:16258:0312/154027:ERROR:ssl_client_socket_openssl.cc(1149)] handshake failed; returned -1, SSL error code 1, net
_error -100
[16219:16258:0312/154027:ERROR:ssl_client_socket_openssl.cc(1149)] handshake failed; returned -1, SSL error code 1, net
_error -100
[16219:16219:0312/154027:INFO:CONSOLE(228)] "Pusher : Connecting : {"transport":"ws","url":"ws://localhost:50389/app/?protocol=7&client=js&version=3.0.0&flash=false"}", source: chrome-extension:///background.js (228)
pusher-js-3.0.0.js
var pusher = new Pusher(PUSHER_API_KEY, {
wsHost: 'localhost',
wsPort: 50389,
httpHost: 'localhost',
httpPort: 39381,
encrypted: false,
disableStats: true,
enabledTransports: ["ws"],
authEndpoint: PUSHER_AUTH_URL,
auth: {
headers: {
'Authorization': authToken
}
}
});
Config in pusher.rb
config.serve_static_files = ENV["RAILS_SERVE_STATIC_FILES"].present?
Pusher.app_id = ENV["PUSHER_APP_ID"]
Pusher.key = ENV["PUSHER_API_KEY"]
Pusher.secret = ENV["PUSHER_API_SECRET"]
PUSHER_HTTP_HOST = ENV["PUSHER_HTTP_HOST"] # 39381
HTTP_PORT = ENV["PUSHER_HTTP_PORT"] #localhost
PUSHER_WS_PORT = ENV["PUSHER_WS_PORT"] # 50389
PUSHER_WS_HOST = ENV["PUSHER_WS_HOST"] #localhost
require "pusher-fake"
Thin::Logging.silent = false
PusherFake.configuration.verbose = true
PusherFake.configuration.web_options = { host: PUSHER_HTTP_HOST, port: HTTP_PORT }
PusherFake.configuration.socket_options = { host: PUSHER_WS_HOST, port: PUSHER_WS_PORT, secure: false }
require "pusher-fake/support/base"
---Log---
No logging after boot until the 44 second mark.
=> Booting Thin
=> Rails 4.2.5 application starting in development on http://0.0.0.0:3000
=> Run rails server -h
for more startup options
=> Ctrl-C to shutdown server
PusherFake socket_options
{:host=>"localhost", :port=>"50389", :secure=>false}
PusherFake web_options
{:host=>"localhost", :port=>"39381"}
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
Gemfile in pusher-fake-example:
source "https://rubygems.org"
gem "pusher", "0.17.0"
gem "pusher-fake", "1.5.0"
gem "rails", "4.2.5"
gem "thin", "1.6.4"
gem "eventmachine", "1.0.9.1"
Any ideas?