Closed Bug 1700309 Opened 4 years ago Closed 4 years ago

Firefox can’t establish a connection to the server at wss://analysis.chess.com/.

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: gcp, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

STR:

  1. Play a game on chess.com
  2. Run the "Game Report" feature (this may require a paid account)

Expected:

Game analysis runs and appears at the end.

Actual:

Intermittently, you get the message:

"We are having some trouble connecting to the server right now... Try again when you have a better connection."

Devtools shows:

Firefox can’t establish a connection to the server at wss://analysis.chess.com/. analysis.client.757676fd.js:2:5303396
Socket is closed. Reconnect will be attempted in NaN seconds. analysis.client.757676fd.js:2:5315492
Uncaught (in promise) undefined

Networking log is attached.

The problem is intermittent on different machines on different operating systems. I tried switching profiles, bisecting, Fission and some experimental prefs on/off but it occurs with all configurations, and intermittently enough that bisecting won't work.

I took a quick look at the log, but the log doesn't have the information about websocket.
So, could you try to capture the log again? This time, please add nsWebSocket:5 to MOZ_LOG module. Thanks.

Flags: needinfo?(gpascutto)
Flags: needinfo?(gpascutto)
Assignee: nobody → kershaw
Severity: -- → S2
Priority: -- → P1
Whiteboard: [necko-triaged]

Thanks for the log. It's really helpful.
So the problem is that we failed to use the IP hint address because nsIDNSService::RESOLVE_BYPASS_CACHE is set. At here, AsyncResolveNative returns an error immediately, so the connection is failed. I think we should retry when RESOLVE_IP_HINT is set.

2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp Creating DnsAndConnectSocket [this=1fc44834480 trans=1fc4ab56800 ent=analysis.chess.com key=.S......[tlsflags0x00000000]analysis.chess.com:443 <ROUTE-via analysis.chess.com.cdn.cloudflare.net:443> {NPN-TOKEN h2}^partitionKey=%28https%2Cchess.com%29]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp DnsAndConnectSocket::SetupDnsFlags [this=1fc44834480] 
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver Resolving host [analysis.chess.com.cdn.cloudflare.net]<^partitionKey=%28https%2Cchess.com%29> type 0. [this=1fc32072820]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver   Offline request for host [analysis.chess.com.cdn.cloudflare.net]; ignoring.
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp Setting Socket to use IP hint address
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp DnsAndConnectSocket::SetupDnsFlags flags=24577 flagsBackup=24609 [this=1fc44834480]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp DnsAndConnectSocket::SetupEvent state=0 event=0
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: V/nsHttp DnsAndConnectSocket::TransportSetup::ResolveHost [this=1fc448344e0 analysis.chess.com.cdn.cloudflare.net bypass cache]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: E/nsHttp nsHttpTransaction::OnSocketStatus [this=1fc4ab56800 status=804b0003 progress=0]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver Resolving host [analysis.chess.com.cdn.cloudflare.net]<^partitionKey=%28https%2Cchess.com%29> - bypassing cache type 0. [this=1fc32072820]
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver   No usable record in cache for host [analysis.chess.com.cdn.cloudflare.net] type 0.
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver NameLookup host:analysis.chess.com.cdn.cloudflare.net af:0
2021-03-25 11:57:11.381000 UTC - [Parent 14820: Socket Thread]: D/nsHostResolver Skip lookup if RES_IP_HINT is set
Attachment #9211645 - Attachment description: WIP: Bug 1700309 - Retry DNS query when RESOLVE_IP_HINT is set → Bug 1700309 - Retry DNS query when RESOLVE_IP_HINT is set
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd8358587fa4 Retry DNS query when RESOLVE_IP_HINT is set r=necko-reviewers,dragana
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Confirming this is fixed for me.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: