sockjs / sockjs-client

WebSocket emulation - Javascript client
MIT License
8.43k stars 1.3k forks source link

Whoops! Lost connection to websocket endpoint #454

Closed mhabsaoui closed 6 years ago

mhabsaoui commented 6 years ago

Hi,

I am working with spring websocket v4.2.3 under Java 1.7. Deploying is made on Tomcat 7.0 server (without spring-boot).

Opening Web Socket... GET http://localhost:8080/ws/info?t=1536733706374 404 (Introuvable) Whoops! Lost connection to http://localhost:8080/ws

Any help is welcome.

manishparganiha commented 5 years ago

In your web security config class. public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

in configure method put below code. @Override protected void configure(HttpSecurity http) throws Exception { http.cors().and().csrf().disable().authorizeRequests() .antMatchers("/ws/info", "/ws/**",
) .permitAll(); }

It should work.

Malikkhoja-zz commented 4 years ago

Hi @manishparganiha ,

I am using an https url for my websocket. It works fine on all the browswer, however doesnt work for my React Native Mobile App. I have tried other solutions as well but none of them worked.

Can you help?

Thanks in advancee

ckrgithub commented 3 years ago

@Malikkhoja I had the same problem. Have you solved it

Naishadh8115 commented 3 years ago

@Malikkhoja & @ckrgithub Are you able to find solution for react native, Help please if you have solved.

GittyAjay commented 1 year ago

Hi @manishparganiha ,

I am using an https url for my websocket. It works fine on all the browswer, however doesnt work for my React Native Mobile App. I have tried other solutions as well but none of them worked.

Can you help?

Thanks in advancee

https://medium.com/@sormailgu/react-native-stomp-android-whoops-lost-connection-e55daf727e27

shailesh-keshri commented 1 month ago

I'm getting this error in my angular application how to resolve this? Someone please suggest any solution I asked GPT as well no solution given