ghedipunk / PHP-Websockets

A Websockets server written in PHP.
BSD 3-Clause "New" or "Revised" License
913 stars 376 forks source link

SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally #19

Closed mkeryeski closed 9 years ago

mkeryeski commented 9 years ago

I am using the echo test server with a few modiciations, which is working properly in Firefox and Chrome. However, after about 30 seconds I get this error in IE console:

SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally

And the client then disconnects.

Any ideas?

blondie101010 commented 9 years ago

This is probably a compatibility issue with your version of Internet Explorer.

If that's not the case, it would most likely be a firewall issue.

ghedipunk commented 9 years ago

Which version of IE are you using?

Are there any error messages in the server?

What is your network topology between the client and server? (Any routers, firewalls, load balancers, etc.? Is the server in a hosted environment?)

Can you send any messages normally, or does it simply hang after connecting for about 30 seconds before giving the error?

mkeryeski commented 9 years ago

Thanks for the responses, everyone. I actually tracked it down to some malformed message I was sending back to the browser. For some reason, Chrome and Firefox were OK with it but IE 11 wasn't. Took me all night, but at least it's fixed.

Thanks and keep up the good work!

xelzmm commented 9 years ago

Hi @mkeryeski , I've got the same error as you, I'm using wss for connection, it failed to open in IE10+? could you leave any advise? Thanks

mkeryeski commented 9 years ago

Been a while since I played with this. All I remember is that there was some error in my code that was sending bad data back to the browser. The unchanged code from this website always worked for me.

xelzmm commented 9 years ago

Thanks a lot, I'll check for that.

NithishHemanth commented 6 years ago

Hi All,

I also face the same error in my server having signalr2.2.2 and websocket protocol enabled for my web application.

[11:14:06 GMT-0600 (Central Standard Time)] SignalR: Connecting to websocket endpoint 'wss://xx/xx/signalr/reconnect?transport=webSockets&groupsToken=xxx [11:14:06 GMT-0600 (Central Standard Time)] SignalR: Websocket opened. SignalR state changed from: reconnecting to: connected id_1516900245702 is reconnected SCRIPT12030: WebSocket Error: Network Error 12030, The connection with the server was terminated abnormally

Any thoughts to resolve this issue would be more helpful.

thanks!

NithishHemanth commented 6 years ago

Any thoughts on this issue?

ghedipunk commented 6 years ago

My thoughts are: This isn't enough information to go on (and really deserves its own thread, since the original thread was for an issue staying connected to IE, not an issue with SignalR).

DetectiveBox commented 5 years ago

Hi, I face the same error on IE Edge , and it does not occur always but occasionally. I have inport polyfill for ts. How did you solve this error please?

gfox1984 commented 5 years ago

This is very empirical, but I seem to reproduce the problem on Edge only when the payload I'm sending to the server is approximately 60K or greater.

gfox1984 commented 5 years ago

Correction: for the guys who use signalr, there's a setting to change to allow messages bigger than 64K. Just drop this line in your Startup.cs, after app.MapSignalR():

Microsoft.AspNet.SignalR.GlobalHost.Configuration.MaxIncomingWebSocketMessageSize = null;