SockJS on IE9 - getting ERROR - Incompatibile SockJS! Main site uses: "1.0.3", the iframe: "1.0.0" - spring

I am using SockJS 1.0.3 for websocket with fallback support. Using Spring Websocket API with SockJS on the server side.
Everything seems to be working fine except when I try and connect using IE9. As the browser tries to connect to the URL, following message is displayed on the console
Incompatibile SockJS! Main site uses: "1.0.3", the iframe: "1.0.0"
After throwing this message, the connection gets established, however, after approx. 60 seconds the connection gets closed automatically. I don't get such behavior on any other browser (Mozilla / Chrome / IE11).
Anyone having any clue on what's going on actually.
Please help!!

The issue got resolved finally. Resolution was in the error message, so changed the SockJS version from 1.0.3 to 1.0.0
Now, don't see the "Incompatible SockJS Message" on console and the connection too is not closed automatically.

Related

Cypress giving error "WebSocket is closed before the connection is established"

When i visit baseURL, it will navigate to keycloak login, after entering login details, then it will navigate to production URL.
So, I'm navigating back to baseURL. At that time, it will throw below error in
console. Hence Page is keep on loading.
VM245 2.1fc033ba.chunk.js:2 WebSocket connection to 'wss://<proxy URL>' failed:
WebSocket is closed before the connection is established.
I already setup below configuration in cypress.config.js file
e2e: {
experimentalSessionAndOrigin:true,
experimentalSessionSupport:true,
}
If i do same thing in manually, it will work but from cypress tool its not working.
Is there any configuration I'm missing ?
Above issue is resolved in new version of Cypress 12.0.2 version.

Error: Incompatibile SockJS! Main site uses: "1.4.0", the iframe: "1.0.0"

I am using Spring boot websocket backend.
And React as a frontend.
I have a websocket call which works fine on Chrome but not on Firefox.
Can someone please help?
Below is the error I am getting on the web console.
Error: Incompatibile SockJS! Main site uses: "1.4.0", the iframe: "1.0.0".
I met the same problem. It turned to be the connection from browser to server took too much time, therefore sockjs-client tried to downgrade from websocket to http streaming.
My client is Angular, not React. I increased the timeout setting when initiating SockJS in angular resolved my problem:
const socket = new SockJS(ENVIRONMENT.api.ws, null, { timeout: 15000});

ActionCable channel subscription failing when I run the server and query on the Chrome console

I am creating a chat app using Rails 5.0.0.beta2 which includes ActionCable for WebSockets. When I start the Puma server and reload the page, I am trying to test and see if I made the connection correctly and whether I can get a subscription confirmation to return in the console. http://www.youtube.com/watch?v=n0WUjGkDFS0&t=7m36s (please see from 7:36 - 8:36) I am seeing neither a meta tag, nor am I able to query for App in the Chrome console. Does anyone have a suggestion for what I can do to debug this problem?
I think you're missing the <%= action_cable_meta_tag %> on your layout (maybe app/views/layouts/application.html.erb )
That's why it's not reconnecting.
I had the same mistake, root layout with the meta tag, going to a page using a different layout, still connect to the websocket, reloading, no meta tag, no websocket.
FYI you can find the code of the video tutorial in your post here :
http://hectorperezarenas.com/2015/12/26/rails-5-tutorial-how-to-create-a-chat-with-action-cable/

Websocket, Error 404 in voltrb

I tried deploying a volt application using Docker via cloud66.
The image is deployed, the page is accessible but i can not login because i get the error :
WebSocket connection to 'wss://mps_sports_c66.totole.xyz/socket' failed: Error during WebSocket handshake: Unexpected response code: 404
Is there something special to do while deploying with a docker image?
Cheers,
Kevin
Websockets upgrade a http connection, so if you can get stuff back from the http request, then the issue is that cloud66 has a non-websocket compatible http proxy between you and your server.
http://community.cloud66.com/articles/cloud-66-websocket-support
I added a config option (on master) to specify the websocket url, see the docs here: https://github.com/voltrb/docs/blob/master/en/deployment/README.md#custom-socket-url To run off of master, change your gemfile to use:
gem 'volt', github: 'voltrb/volt'
then run bundle
If you get things working on cloud66, would you mind adding docs for setting it up to the docs repo? https://github.com/voltrb/docs
Thanks!

GWT RequestBuilder POST and XSS

I'm using GWT 2.1.1 and in my app there is a RequestBuilder/POST that fails (cross site scripting XSS). The main cause is the different urls for client and server:
client in dev-mode: http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997#...
server jetty: http://localhost:8080/myapp/
so the browser (firefox in my case) "stops" the incoming post-request.
Is there a workaround (at least for development) to continue using gwt in dev mode?
I tried the proxy config:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46
but nothing seems to happen :(
any idea?
Thanks,
Julio

Resources