Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

No message provided to error "WebSocket connection to url failed: " #246

Open
Donkijote opened this issue Aug 4, 2021 · 0 comments
Open

Comments

@Donkijote
Copy link

Hi, recently the company I'm working for made some changes in the cloud architecture and change the Kong api gateway version they where using and that cause a websocket error, and the problem is that the error message is empty and I can not identify what is causing the websocket to fail.

This is what is being log to the console:

debugging... Opening Web Socket...
WebSocket connection to 'wss://apiurl/socket' failed: client.js:274
debugging... Connection closed to wss://apiurl/socket
debugging... STOMP: scheduling reconnection in 5000ms
debugging... Connection not established in 10000ms, closing socket

this is my config:

  this.rxStompService.configure({
    brokerURL: environment.websocket,
    debug: (msg) => {
      console.log('debugging...' + msg);
    },
  });

  this.rxStompService.activate();

  this.wsSubscription = this.rxStompService
    .watch('/topic/group/'+this.groupId)
    .subscribe(
      (data) => {
        const body: Websocket = JSON.parse(data.body);
        this.alertService.messageIzi(
          'New ${body.countCases} cases'
        );
      },
      (error) => {
        console.error(error);
      }
    );

Thanks very much for your help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant