servo: Generic websocket error when connecting over WSS using UWP
Details
I’ve been having some issues making a secure websockets connection on the Hololens 2. In particular, this webpage (http://yeticgi.casualos.com/?story=test1&pagePortal=home) works fine over HTTP (and WS) but fails to work over HTTPS (and WSS).
All the HTTPS stuff seems to work fine - it’s only initiating a connection over secure websockets that is failing. The error message is brief:
Error: websocket error
When I tried to build with --features js_backtrace to get some more info, I ran into some issues as documented here: https://github.com/servo/servo/pull/27042
I’ve also tried loading the same URL with a MacOS build and it worked fine so it seems to be Hololens 2 specific.
Runtime details
OS: Windows Holographic for Business
OS Build: 10.0.19041.1106
Servo Version: https://github.com/KallynGowdy/servo/commit/6a5a77a968898fac76df3cdf3c5b661be10e2f22
Build details
OS: Windows 10 Pro
OS Version: 1903
OS Version: 18362.900
Servo Version: https://github.com/KallynGowdy/servo/commit/6a5a77a968898fac76df3cdf3c5b661be10e2f22
Build Command:
C:\Python27\python.exe mach build -d --uwp --win-arm64
Reproduction steps
- Make a build of Servo using this command:
path\to\python.exe mach build -d --uwp --win-arm64
- (Optional) Replace the default URL in
DefaultUrl.hwithhttps://yeticgi.casualos.com/?story=test1&pagePortal=home. - Run on the Hololens 2 via Visual Studio.
- Go to https://yeticgi.casualos.com/?story=test1&pagePortal=home
- If you did step 2 then this will happen automatically.
- A loading window should pop up on the right side of the browser window.
- It is supposed to be centered, but there’s some CSS issue that’s causing it to be anchored to the right.
- The debug log will show that the app starts up and tries to make a websockets connection but keeps erroring for some reason.
Some things to note:
- The app works by first loading all the JS/CSS/HTML it needs and starting a web worker that initiates the websocket connection.
- The websocket errors are being logged here.
- I tried to get extra debug information by enabling the
js_backtracefeature as specified here but I ran into a separate runtime issue detailed here. - Seems weird that two threads exit every time that the websocket connection errors. I’m guessing this is because Servo allocates another thread to handle the networking in this case and it exits because there’s nothing else to do.
Logs
Debug Logs
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
[globalThis-polyfill] load
THREE.WebGLRenderer: WEBGL_depth_texture extension not supported.
[AppManager] Starting init...
[AppManager] Fetching config...
TypeError: e.style is undefined
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
Unable to save config:
MissingAPIError: indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.
Skipping Sentry Initialization
[AppManager] Setting primary simulation:
test1
Unable to get Username
MissingAPIError: indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.
[AppManager] Generating new login key...
Unable to save user to DB
MissingAPIError: indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.
Unable to save username
MissingAPIError: indexedDB API not found. If using IE10+, make sure to run your code on a server URL (not locally). If using old Safari versions, make sure to include indexedDB polyfill.
[BaseSimulation] init
[BaseSimulation] Status:
Starting...
RUST: WARN - script::timers - Resuming an already resumed timer.
RUST: WARN - constellation::browsingcontext - BrowsingContext BrowsingContextId { namespace_id: PipelineNamespaceId(2), index: BrowsingContextIndex(29) } iterated after closure.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - script::timers - Resuming an already resumed timer.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
RUST: WARN - media::media_thread - Tried to remove an unknown player
RUST: WARN - media::media_thread - Tried to remove an unknown player
The thread 0x1670 has exited with code 0 (0x0).
RUST: WARN - mozjs::rust - Warning at https://yeticgi.casualos.com/vendors.8e14baa88946c15832fc.js:0:0: asm.js type error: Disabled by lack of compiler support
RUST: WARN - net::http_loader - Failed to receive confirmation request was streamed without error.
[globalThis-polyfill] load
[IframeEntry] Listening for port...
[globalThis-polyfill] load
[AuxChannel.worker] Listening for port...
[IframeEntry] Got port, sending to worker instance.
RUST: WARN - script::dom::globalscope - maybe_add_pending_ports called on a global not managing any ports.
[AuxChannel.worker] Got port, exposing API
RUST: WARN - constellation::constellation - Unexpected messageport shipped received
[SocketManager] Starting...
The thread 0x760 has exited with code 0 (0x0).
The thread 0x380 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[BaseSimulation] Status:
Initialized.
[PlayerApp] Not authenticated:
undefined
[SocketManager] Connection error.
Error: websocket error
The thread 0x1774 has exited with code 0 (0x0).
The thread 0x764 has exited with code 0 (0x0).
The thread 0x1828 has exited with code 0 (0x0).
The thread 0x4a8 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1590 has exited with code 0 (0x0).
The thread 0x1ab8 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0x164c has exited with code 0 (0x0).
The thread 0x9cc has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1854 has exited with code 0 (0x0).
The thread 0x1ab4 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1b48 has exited with code 0 (0x0).
The thread 0x13f4 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x13a4 has exited with code 0 (0x0).
The thread 0x1130 has exited with code 0 (0x0).
The thread 0x1530 has exited with code 0 (0x0).
The thread 0x1aa4 has exited with code 0 (0x0).
The thread 0x1a50 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0x90c has exited with code 0 (0x0).
The thread 0xcc8 has exited with code 0 (0x0).
The thread 0xb70 has exited with code 0 (0x0).
The thread 0x1108 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x140c has exited with code 0 (0x0).
The thread 0x15c0 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0x113c has exited with code 0 (0x0).
The thread 0x16c4 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xf70 has exited with code 0 (0x0).
The thread 0x1ac0 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x10e0 has exited with code 0 (0x0).
The thread 0x1620 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1888 has exited with code 0 (0x0).
The thread 0x7f4 has exited with code 0 (0x0).
The thread 0x18f8 has exited with code 0 (0x0).
The thread 0x2b4 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0x14d0 has exited with code 0 (0x0).
The thread 0x11b0 has exited with code 0 (0x0).
'ServoApp.exe' (Win32): Unloaded 'C:\Windows\system32\minglobinputhost.dll'
'ServoApp.exe' (Win32): Unloaded 'C:\Windows\system32\Windows.Globalization.dll'
'ServoApp.exe' (Win32): Unloaded 'C:\Windows\system32\execmodelproxy.dll'
'ServoApp.exe' (Win32): Unloaded 'C:\Windows\system32\Windows.Shell.ServiceHostBuilder.dll'
The thread 0xd74 has exited with code 0 (0x0).
The thread 0x127c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0xe98 has exited with code 0 (0x0).
The thread 0x125c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x900 has exited with code 0 (0x0).
The thread 0x96c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xb14 has exited with code 0 (0x0).
The thread 0x1714 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x3f0 has exited with code 0 (0x0).
The thread 0x1518 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x16a0 has exited with code 0 (0x0).
The thread 0x390 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x834 has exited with code 0 (0x0).
The thread 0x954 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1ab8 has exited with code 0 (0x0).
The thread 0x1970 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x164c has exited with code 0 (0x0).
The thread 0x1a3c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xef0 has exited with code 0 (0x0).
The thread 0x1ac has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1b2c has exited with code 0 (0x0).
The thread 0xf44 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x894 has exited with code 0 (0x0).
The thread 0x1760 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1bb0 has exited with code 0 (0x0).
The thread 0x1b38 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1530 has exited with code 0 (0x0).
The thread 0x584 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xa4 has exited with code 0 (0x0).
The thread 0x748 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xe00 has exited with code 0 (0x0).
The thread 0xec0 has exited with code 0 (0x0).
The thread 0x8ac has exited with code 0 (0x0).
The thread 0x1a74 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0x1a8c has exited with code 0 (0x0).
The thread 0x8 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x9c4 has exited with code 0 (0x0).
The thread 0xe90 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x15a8 has exited with code 0 (0x0).
The thread 0x20c has exited with code 0 (0x0).
The thread 0x644 has exited with code 0 (0x0).
The thread 0xc4c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x71c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1b84 has exited with code 0 (0x0).
The thread 0x96c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xb14 has exited with code 0 (0x0).
The thread 0x634 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x220 has exited with code 0 (0x0).
The thread 0x1180 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x390 has exited with code 0 (0x0).
The thread 0x16a0 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x350 has exited with code 0 (0x0).
The thread 0x1590 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x9a0 has exited with code 0 (0x0).
The thread 0x10d8 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1ac has exited with code 0 (0x0).
The thread 0xef0 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1b2c has exited with code 0 (0x0).
The thread 0xc40 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x1978 has exited with code 0 (0x0).
The thread 0x1bf8 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xa3c has exited with code 0 (0x0).
The thread 0x91c has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0x584 has exited with code 0 (0x0).
The thread 0x1530 has exited with code 0 (0x0).
[SocketManager] Connection error.
Error: websocket error
The thread 0xed8 has exited with code 0 (0x0).
The thread 0x6dc has exited with code 0 (0x0).
The thread 0xe00 has exited with code 0 (0x0).
[SocketManager] Connection error.
The thread 0x868 has exited with code 0 (0x0).
Error: websocket error
[SocketManager] Connection error.
Error: websocket error
The thread 0xed4 has exited with code 0 (0x0).
The thread 0x550 has exited with code 0 (0x0).
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (15 by maintainers)
Commits related to this issue
- Auto merge of #27164 - jdm:tungstenite, r=<try> Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementa... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=<try> Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementa... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=<try> Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementa... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=nox Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementati... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=nox Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementati... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=nox Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementati... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=nox Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementati... — committed to servo/servo by bors-servo 6 years ago
- Auto merge of #27164 - jdm:tungstenite, r=nox Replace ws-rs with async-tungstenite. This change moves us from ws-rs (which doesn't see a lot of maintainer activity) and its custom async implementati... — committed to servo/servo by bors-servo 6 years ago
I can also confirm that is fixed on the Hololens 2.
I have verified that the page loads as expected with #27164 applied.
I’ve started work to integrate tungstenite in https://github.com/jdm/servo/tree/tungstenite. When attempting to write the code that would support reading and writing independently, I realized that we’re going need to add an async layer on top of tungstenite. Possibilties include:
Neither of these options have built-in support for openssl that I can see. While tungstenite works out of the box with any stream that wraps TLS, it looks like we need the equivalent of hyper_openssl to integrate openssl in the async tungstenite ecosystem. Fun times.