Incompatibile SockJS! Main site uses: "1.1.4", the iframe: "1.0.0". How to deal with that?
I fixed it by manually hardcoding the SockJS version on the server-side (Spring/Java) by
@Override
public void registerStompEndpoints( StompEndpointRegistry registry )
{
registry.addEndpoint( "/socket" )
.setAllowedOrigins( "*" )
.withSockJS( )
.setClientLibraryUrl( "https://cdn.jsdelivr.net/sockjs/1.1.4/sockjs.min.js" );
}
Update: To load the JS library (local) using a relative path
@Override
public void registerStompEndpoints( StompEndpointRegistry registry )
{
registry.addEndpoint( "/socket" )
.setAllowedOrigins( "*" )
.withSockJS( )
.setClientLibraryUrl( "../lib/sockjs-client/dist/sockjs.min.js" ); // Added
}