R
R
RMate2020-07-11 20:32:57
Laravel
RMate, 2020-07-11 20:32:57

Why can't firefox connect to socket (laravel-echo-server)?

Hello! I do event broadcasting via laravel-echo-server + https. In all browsers everything works correctly, firefox writes the following error:

Во время загрузки страницы соединение с wss://domain.ru:6001/socket.io/?EIO=3&transport=websocket было прервано. app.js:44502:12
Firefox не может установить соединение с сервером wss://domain.ru:6001/socket.io/?EIO=3&transport=websocket.


On the client side, I initialize the connection as follows:

window.Echo = new Echo({
    broadcaster: "socket.io",
    host: window.location.hostname + ":6001",
    transports: ["websocket", "polling", "flashsocket"],
    auth: {
        headers: {
            Authorization: "Bearer token"
        },
    },
})


laravel -echo-server config :
{
  "authHost": "https://domain.ru",
  "authEndpoint": "/api/broadcasting/auth",
  "clients": [
  ],
  "database": "redis",
  "databaseConfig": {
    "redis": {},
    "sqlite": {
      "databasePath": "/database/laravel-echo-server.sqlite"
    }
  },
  "devMode": true,
  "host": null,
  "port": "6001",
  "protocol": "https",
  "socketio": {},
  "sslCertPath": "путь_к_сертификату.crt",
  "sslKeyPath":  "путь_к_сертификату.key",
  "sslCertChainPath": "",
  "sslPassphrase": "",
  "subscribers": {
    "http": true,
    "redis": true
  },
  "apiOriginAllow": {
    "allowCors": true,
    "allowOrigin": "https://domain.ru",
    "allowMethods": "GET, POST",
    "allowHeaders": "Origin, Content-Type, X-Auth-Token, X-Requested-With, Accept, Authorization, X-CSRF-TOKEN, X-Socket-Id"
  }
}


I tried to set up proxying through nginx according to the documentation from the github , the situation is similar. Chrome, opera, safari - are connected, firefox is not.

letsencrypt certificate Node
version 12.13.0 laravel
version 6
version laravel-echo-server1.6.0, also tested on 1.5.0

Please tell me what could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RMate, 2020-07-12
@RMate

The issue is closed, the problem was in the certificate. Use the sslshopper ssllabs checkers .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question