Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

[BUG] Client connection from Chrome browser gets 1006 Connection closed. Client needs to ping the server for ws to connect. #1221

Open
Assignees
rennokki
Labels
@razvan-p

Description

@razvan-p

Hi. I'm using soketi with docker, all behind traefik v3 reverse proxy. I encounter a strange issue from some time and I don't know exactly from where is coming form. The strange behaviour is simple to describe:

Description

Let's say we have one subdomain for the client app (client.example.com), and one for the websocket server (event.example.com). These two subdomains have ssl installed. When the client (Laravel Echo) tries to connect to websocket server via wss at event.example.com the ws server sends this response after a period of time (30 seconds timeout):

[Wed Jul 31 2024 10:12:29 GMT+0000 (Coordinated Universal Time)] ❌ Connection closed:   {  ws: uWS.WebSocket {    ip: '192.168.65.1',    ip2: '',    appKey: 'test',    sendJson: [Function (anonymous)],    id: '7923370506.8172174167',    subscribedChannels: Set(0) {},    presence: Map(0) {},    app: App {      initialApp: [Object],      server: [Server],      enableUserAuthentication: false,      hasClientEventWebhooks: false,      hasChannelOccupiedWebhooks: false,      hasChannelVacatedWebhooks: false,      hasMemberAddedWebhooks: false,      hasMemberRemovedWebhooks: false,      hasCacheMissedWebhooks: false,      id: 'test',      key: 'test',      secret: 'test-secret',      maxConnections: -1,      enableClientMessages: true,      enabled: true,      maxClientEventsPerSecond: -1,      maxPresenceMembersPerChannel: 100,      maxPresenceMemberSizeInKb: 2,      maxChannelNameLength: 200,      maxEventChannelsAtOnce: 100,      maxEventNameLength: 200,      maxEventPayloadInKb: 100,      maxEventBatchSize: 10    },    timeout: Timeout {      _idleTimeout: 120000,      _idlePrev: [TimersList],      _idleNext: [TimersList],      _idleStart: 67183344,      _onTimeout: [Function (anonymous)],      _timerArgs: undefined,      _repeat: null,      _destroyed: false,      [Symbol(refed)]: true,      [Symbol(kHasPrimitive)]: false,      [Symbol(asyncId)]: 140022,      [Symbol(triggerId)]: 0    }  },  code: 1006,  message: ArrayBuffer { [Uint8Contents]: <>, byteLength: 0 }}

In browser console:

WebSocket connection to 'wss://event.example.com/app/test?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed: WebSocket is closed before the connection is established.

This is happening only in Chrome or Brave browser (Firefox for example works very well).After I ping the server from client or open event.example.com url in a new tab, the client establish the connection to ws successfully. Does anyone know where to look further or how to manage this kind of situation?

Screenshots

Firefox (success):
firefox

Chrome/Brave (fail):
Screenshot 2024-07-27 at 19 02 27

Chrome/Brave (success after ping or open url in a new tab):
brave

Environment

  • Soketi version: 1
  • Adapter: local
  • App Manager: array
  • Queue: sync
  • Cache Managers: memory

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp