Closed Bug 1602502 Opened 4 years ago Closed 4 years ago

Firefox beta 72.0b4 closes websocket connection with a code:1006 and an empty reason

Categories

(Core :: Networking: WebSockets, defect, P1)

72 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- unaffected
firefox72 --- fixed
firefox73 --- fixed

People

(Reporter: pvpnguyen, Assigned: kershaw)

Details

(Keywords: regression, Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

A java script client on Firefox beta connects to a server using libwebsocket. A self-signed certificate is used on the server.
The client first gets a socket.onopen(), then a socket.onerror(), then socket.onclose() with a code:1006 and an empty reason.
On the server side, it does receive LWS_CALLBACK_ESTABLISHED

Actual results:

Websoket works fine on 71.0 version but FireBox beta 72.0b4 closes websocket connection with a code:1006 and an empty reason

Expected results:

Websocket/self-signed certificate should work fine on FireBox beta 72.0b4

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Networking: WebSockets
Product: Firefox → Core

Hi Reporter,

Could you try to use mozregression to help us find out which commit causes this issue?
Thanks.

Flags: needinfo?(pvpnguyen)

(In reply to Kershaw Chang [:kershaw] from comment #2)

Hi Reporter,

Could you try to use mozregression to help us find out which commit causes this issue?
Thanks.

Hi, after running mozregression, here is the end result:

2019-12-09T17:17:41: INFO : platform_version: 72.0a1
2019-12-09T17:18:47: INFO : Narrowed inbound regression window from [94c9b646, 3079e085] (3 builds) to [94c9b646, 56b7bbfb] (2 builds) (~1 steps left)
2019-12-09T17:18:47: DEBUG : Starting merge handling...
2019-12-09T17:18:47: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=56b7bbfba2265b0df382e3c2de2255f0bccc05c6&full=1
2019-12-09T17:18:48: DEBUG : Found commit message:
Bug 1579049 - Part2: Expose proxy response error code in nsIProxiedChannel.idl r=mayhemer

Differential Revision: https://phabricator.services.mozilla.com/D51143

2019-12-09T17:18:48: DEBUG : Did not find a branch, checking all integration branches
2019-12-09T17:18:48: INFO : The bisection is done.
2019-12-09T17:18:48: INFO : Stopped

Thanks

Flags: needinfo?(pvpnguyen)

(In reply to Nguyen Phung from comment #3)

(In reply to Kershaw Chang [:kershaw] from comment #2)

Hi Reporter,

Could you try to use mozregression to help us find out which commit causes this issue?
Thanks.

Hi, after running mozregression, here is the end result:

2019-12-09T17:17:41: INFO : platform_version: 72.0a1
2019-12-09T17:18:47: INFO : Narrowed inbound regression window from [94c9b646, 3079e085] (3 builds) to [94c9b646, 56b7bbfb] (2 builds) (~1 steps left)
2019-12-09T17:18:47: DEBUG : Starting merge handling...
2019-12-09T17:18:47: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=56b7bbfba2265b0df382e3c2de2255f0bccc05c6&full=1
2019-12-09T17:18:48: DEBUG : Found commit message:
Bug 1579049 - Part2: Expose proxy response error code in nsIProxiedChannel.idl r=mayhemer

Differential Revision: https://phabricator.services.mozilla.com/D51143

2019-12-09T17:18:48: DEBUG : Did not find a branch, checking all integration branches
2019-12-09T17:18:48: INFO : The bisection is done.
2019-12-09T17:18:48: INFO : Stopped

Thanks

Thanks for the information. But, this patch just exposed the response code from proxy server and should have nothing to to with websocket.
Could you also try to capture the http log?
The log might contain some private information (e.g., cookies). You might want to use a clean profile or send it directly to my email (kershaw at mozilla dot com).

By the way, is it possible to provide a website to me? So I can try to reproduce this by myself.
Thanks.

Flags: needinfo?(pvpnguyen)
Summary: FireBox beta 72.0b4 closes websocket connection with a code:1006 and an empty reason → Firefox beta 72.0b4 closes websocket connection with a code:1006 and an empty reason

(In reply to Kershaw Chang [:kershaw] from comment #4)

(In reply to Nguyen Phung from comment #3)

(In reply to Kershaw Chang [:kershaw] from comment #2)

Hi Reporter,

Could you try to use mozregression to help us find out which commit causes this issue?
Thanks.

Hi, after running mozregression, here is the end result:

2019-12-09T17:17:41: INFO : platform_version: 72.0a1
2019-12-09T17:18:47: INFO : Narrowed inbound regression window from [94c9b646, 3079e085] (3 builds) to [94c9b646, 56b7bbfb] (2 builds) (~1 steps left)
2019-12-09T17:18:47: DEBUG : Starting merge handling...
2019-12-09T17:18:47: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=56b7bbfba2265b0df382e3c2de2255f0bccc05c6&full=1
2019-12-09T17:18:48: DEBUG : Found commit message:
Bug 1579049 - Part2: Expose proxy response error code in nsIProxiedChannel.idl r=mayhemer

Differential Revision: https://phabricator.services.mozilla.com/D51143

2019-12-09T17:18:48: DEBUG : Did not find a branch, checking all integration branches
2019-12-09T17:18:48: INFO : The bisection is done.
2019-12-09T17:18:48: INFO : Stopped

Thanks

Thanks for the information. But, this patch just exposed the response code from proxy server and should have nothing to to with websocket.
Could you also try to capture the http log?
The log might contain some private information (e.g., cookies). You might want to use a clean profile or send it directly to my email (kershaw at mozilla dot com).

By the way, is it possible to provide a website to me? So I can try to reproduce this by myself.
Thanks.

Hi Kershaw, a log file was sent to you via email. Thanks

Flags: needinfo?(pvpnguyen)

Thanks for the reporter's help! This bug is really regressed by bug 1579049.

In websocket case, SpdyConnectTransaction::MapStreamToHttpConnection is called with httpResponseCode -1.
At here, we only check if httpResponseCode is not 200. As a result, we call CreateShimError() and cause this socket transport to be closed with an error.

Assignee: nobody → kershaw
Priority: -- → P1
Whiteboard: [necko-triaged]
Has Regression Range: --- → yes
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88d51948f4e4
If proxy connect is not used, don't call HttpProxyResponseToErrorCode() r=dragana
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Comment on attachment 9115400 [details]
Bug 1602502 - If proxy connect is not used, don't call HttpProxyResponseToErrorCode()

Beta/Release Uplift Approval Request

  • User impact if declined: Websocket over Http2 is broken.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: N/A
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch is just a simple one-line change.
  • String changes made/needed: N/A
Attachment #9115400 - Flags: approval-mozilla-beta?

Comment on attachment 9115400 [details]
Bug 1602502 - If proxy connect is not used, don't call HttpProxyResponseToErrorCode()

necko regression fix for 72.0b7

Attachment #9115400 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: