[rsocket-java] WebSocket connection with TLS

I’m trying to connect to a WebSocket server that uses the wss protocol. For some reason I cannot connect to it, it keeps throwing errors such as this one,

java.lang.IllegalArgumentException: Frame type 29 is unknown

After some various searches online, I’ve found some people who had issues connecting with the secure websocket protocol. The exact code I am using is this,

@Configuration
public class PolygonClientConfiguration {

  private final String uri = "wss://socket.polygon.io/stocks";

  @Bean
  public RSocket rSocket() {
    var ws = WebsocketClientTransport.create(URI.create(uri));
    return RSocketConnector.connectWith(ws).block();
  }

}

and then on my service I have a constructor like this,

  public StocksDataService(RSocket socket) {
    socket.requestResponse(DefaultPayload.create(authString)).log().block();
  }

Did anyone have an issue like this?

Attempting to communicate through the ws protocol is not acceptable as I will be met with a redirect from the provider.