Closed Bug 1704998 Opened 5 months ago Closed 5 months ago

Allow WebSocket to be used by Remote Agent on Android

Categories

(Remote Protocol :: Agent, enhancement, P2)

enhancement
Points:
2

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [bidi-m1-mvp])

Attachments

(1 file)

In WebSocketHandshake.jsm the WebSocket is getting retrieved via Services.appShell.hiddenDOMWindow.WebSocket, which doesn't work on Android.

DevTools is using the WebSocket global, and given that the Remote Agent code is mostly duplicated code from DevTools I thought that we can do the same. But trying to call WebSocket.createServerWebSocket() fails with a plain NS_ERROR_FAILURE error that doesn't contain a message or any other helpful data to understand why it's failing.

I don't know what the difference is between those two ways for accessing WebSocket, but I expect to not see a failure when using the global.

Julian and Alexandre, do you have an idea? Maybe you faced something similar in the past with Devtools.

Flags: needinfo?(poirot.alex)
Flags: needinfo?(jdescottes)
Blocks: 1690252

I spoke with smaug and there is a bug in the WebSocket implementation that he is going to fix. Once we have a bug filed for it I will mark it as dependency.

Flags: needinfo?(poirot.alex)
Flags: needinfo?(jdescottes)
Depends on: 1705147
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Points: --- → 2
Priority: -- → P2
Type: defect → enhancement
Summary: Usage of WebSocket in Remote Agent broken on Android → Allow WebSocket to be used by Remote Agent on Android
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6188f4d79c5
[remote] Don't use hidden window for WebSocket creation. r=remote-protocol-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.