olofd / react-native-signalr

Use SignalR with React Native
150 stars 61 forks source link

Using transport webSockets gives error #43

Open foyarash opened 6 years ago

foyarash commented 6 years ago

Using the following code:

this.connection
        .start({
          transport: 'webSockets',
          data: { name: 'corehub' },
        })
        .done(() => {
          this.isConnected = true;
          console.log('is connected');
        })
        .fail((err) => {
          this.isConnected = false;
          console.log('error', err);
        });

I get the following error:

No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.