Porting/Zoom

From RCS Wiki
Revision as of 08:18, 4 October 2023 by Fitzsim (talk | contribs)
Jump to navigation Jump to search

Problem

In Debian ppc64le Chromium as of October 2023, video fails in the Zoom test meeting and in Zoom calls. The user-visible symptom is the Stop Video spinner spins indefinitely:

The Zoom JavaScript code checks the Chrome version. If that version is less than or equal to 100.0, video works. Read on for failure details.

Workaround

The workaround is to modify the user-agent string to reduce the Chrome version to 100.0.0.0. For example, copy the User Agent value from the Chromium version page and use Chromium's undocumented command line switch to set the user agent:

chromium --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36"

Analysis

Here is the console log when video fails, with the Chrome version at its default 117.0.0.0.

Here is the console log when video succeeds, with the Chrome version reduced to 100.0.0.0.

I encountered this exception while stepping through the JavaScript debugger in the failing case:

"Error from video decode worker: Failed to instantiate WASM https://st1.zoom.us/web-media/mtxkwfl/video.mtsimd.wasm Message: WebAssembly.instantiate(): Compiling function #7437 failed: Wasm SIMD unsupported @+1486482 Stack: CompileError: WebAssembly.instantiate(): Compiling function #7437 failed: Wasm SIMD unsupported @+1486482 Name: Error"

I think what is happening is: the Zoom JavaScript code checks the Chrome version, and if it is greater than 100.0.0.0, it assumes that WASM-SIMD is supported, and so tries to load the WASM version of the video library. However, ppc64le Chromium does not have support for WASM SIMD yet. This WASM feature detect page shows:

I didn't debug further, but I suspect the failure to load this library is what results in the "Uncaught TypeError: video_set_websocket_speed is not a function". That exception repeats and results in the video spinner spinning indefinitely.

Next Steps

  • ppc64le Chromium needs to implement WASM SIMD.

Firefox

I also tested Debian ppc64le Firefox-ESR. It hangs on the "Joining Meeting..." spinner with a JavaScript exception about r.ZP.callOutCountry. I have a nightly version of Firefox with some in-development JIT patches from https://talospace.com that gets much farther, but then the tab crashes. I will add Zoom to my Firefox-JIT testing list as I follow along with its development.

Test Details

Tested October 4, 2023. Test browser details:

Chromium 117.0.5938.132 (Official Build) built on Debian 12.1, running on Debian 12.1 (64-bit)
Revision fa569fb226df361d676b60404623b17b16dddc8a-refs/branch-heads/5938@{#1462}
OS Linux
JavaScript V8 11.7.439.19
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Command Line usr|bin|chromium/4029293-82-orcamain_TIME851498275 --disable-nacl --disable-pings --enable-gpu-rasterization --enable-remote-extensions --load-extension --media-router=0 --no-default-browser-check --origin-trial-disabled-features=WebGPU --show-component-extension-options --restart --flag-switches-begin --flag-switches-end --disable-nacl
Executable Path /usr/lib/chromium/chromium
Profile Path ~/.config/chromium/Default