[Libwebsockets] Firefox client websocket error

Sumit Dubey sumitd2002 at yahoo.com
Wed Feb 26 12:47:04 CET 2020


 Please find attached the lws logs around the time when the websocket got disconnected.
Sumit
    On Wednesday, 26 February 2020, 04:15:49 pm GMT+5:30, Andy Green <andy at warmcat.com> wrote:  
 
 

On 2/26/20 10:40 AM, Sumit Dubey wrote:
> Hi Andy,
> 
> 1. The last few lines of Web Developer->Network->Messages :
> 
> Received
> 
> {"type":"candidate","sdpMid":"5","sdpMLineIndex":5,"candidate":"candidate:4248140096 
> 1 tcp 1518149375 10.186.4.213 52743 typ host tcptype passive generation 
> 0 ufrag zXrm network-id 2 network-cost 10"}    15:50:14.500
> Received {"type":"removetrack","streamid":"stream-0000017CF5BEF040"} 
> 16:01:14.947
> Received {"type":"removetrack","streamid":"stream-0000017CF5BEF040"} 
> 16:01:14.962
> Sent ê    16:01:15.013
> 
> Connection Closed: 1006
> 
> 2. An LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL event is being received just 
> before LWS_CALLBACK_CLOSED on the wsi on the server side.

It's part of the close flow.

Why don't you enable and look at the lws logs?  You're ignoring them 
like they don't exist and they usually contain detailed information 
about what was happening from server perspective (especially if you 
build with -DCMAKE_BUILD_TYPE=DEBUG and logging bitfield like 1151)

-Andy

> Sumit
> 
> On Wednesday, 26 February 2020, 03:39:46 pm GMT+5:30, Andy Green 
> <andy at warmcat.com> wrote:
> 
> 
> 
> 
> On 2/26/20 9:56 AM, Sumit Dubey wrote:
>  > a) does this happen with, eg, libwebsockets-test-server and the browser
>  > at localhost:7681?
>  > The issue is happening in a very specific case. Wont be easy to 
> reproduce.
> 
> If there's something wrong with lws causing this, it's my problem and
> I'll try to debug and fix it.
> 
> If it doesn't happen without your code, you should try to disable your
> code until almost none of it left and see if the problem is still
> coming, so we can agree it's an lws issue.  If not and there's just
> something wrong with your code, it's your problem, not something I need
> to spend time on.
> 
>  > b) if you're using permessage-deflate, still happen if you disable it?
>  > Happening with or without permessage-deflate
>  >
>  > c) what does firefox Web Developer | Network say?
>  > Haven't posted it yet. There are many such issues on Google, but no
>  > definite solutions.
> 
> No I mean, in Firefox, hit the burger menu at the top left and select
> "Web Developer" and then "Network" in the menu, then reload the page.
> 
> Recent firefox shows ws traffic and sometimes useful info in there if
> it's open when you request the page.
> 
> -Andy
> 
>  > Thanks
>  > Sumit
>  >
>  > On Wednesday, 26 February 2020, 02:20:47 pm GMT+5:30, Andy Green
>  > <andy at warmcat.com <mailto:andy at warmcat.com>> wrote:
>  >
>  >
>  >
>  >
>  > On 2/26/20 8:20 AM, Sumit Dubey wrote:
>  >  > Hello,
>  >  >
>  >  > I am seeing the following error in a firefox client after the 
> connection
>  >  > to my libwebsockets based server is successfully established and a few
>  >  > messages have been exchanged:
>  >  >
>  >  > /The connection to wss://localhost:80/ was interrupted while the page
>  >  > was loading
>  >  > /
>  >  > /Websocket error with code:undefined reason:undefined
>  >  > /
>  >  > /Websocket closed with code:1006 reason:
>  >  > /
>  >  >
>  >  > By any chance, does this have something to do with the server? 
> This does
>  >  > not happen with Chrome.
>  >
>  > a) does this happen with, eg, libwebsockets-test-server and the browser
>  > at localhost:7681?
>  >
>  > b) if you're using permessage-deflate, still happen if you disable it?
>  >
>  > c) what does firefox Web Developer | Network say?
>  >
>  > -Andy
>  >
>  >
>  >  > Thank you
>  >  > Sumit Dubey
>  >
>  >  >
>  >  >
>  >  > _______________________________________________
>  >  > Libwebsockets mailing list
>  >  > Libwebsockets at ml.libwebsockets.org 
> <mailto:Libwebsockets at ml.libwebsockets.org>
>  > <mailto:Libwebsockets at ml.libwebsockets.org 
> <mailto:Libwebsockets at ml.libwebsockets.org>>
> 
>  >  > https://libwebsockets.org/mailman/listinfo/libwebsockets
>  >
>  >  >
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200226/8ed6e72e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lws.log
Type: application/octet-stream
Size: 7458 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200226/8ed6e72e/attachment.obj>


More information about the Libwebsockets mailing list