Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widevine: Prevent version incompatibilities between the component and the Arm64 DLL #33595

Closed
mherrmann opened this issue Oct 12, 2023 · 1 comment · Fixed by brave/brave-core#21021

Comments

@mherrmann
Copy link

mherrmann commented Oct 12, 2023

Upstream doesn't support Widevine on Arm64 Windows out of the box. We have a workaround that achieves this support. It works by installing x64 Widevine via the normal mechanism, then fetching an additional Arm64 DLL from Google's official servers.

The current implementation of the workaround hardcodes the Arm64 DLL URL. Eg. https://dl.google.com/widevine-cdm/4.10.2662.3-win-arm64.zip. The problem is that when a new version of Widevine is released, the new version of the component gets installed but the (then) old DLL gets downloaded. This happened in #33594, with (fortunately) apparently no terrible side effects.

We should update our Widevine Arm64 workaround to try to dynamically download and install the latest Arm64 DLL. So when version 4.10.2710.0 of the component gets installed, the workaround should guess the URL of the Arm64 DLL (https://dl.google.com/widevine-cdm/4.10.2710.0-win-arm64.zip in the above case) and try to install that. Only if that fails should the workaround fall back to the known existing URL.

The problem is especially egregious because if a future Widevine version introduces an incompatibility with "our" old DLL, page crashes or other bad things such as the browser getting stuck on a potentially broken Widevine version could occur.

@MadhaviSeelam
Copy link

MadhaviSeelam commented Nov 30, 2023

Verification PASSED using

Brave | 1.62.92 Chromium: 120.0.6099.35 (Official Build) beta (arm64)
-- | --
Revision | 25479475233d8cf2675a9d743dd1a94586f8dbc2
OS | Windows 11 Version 23H2 (Build 22631.2715)

Case 1: With no additional command-line parameters

Bitmovin.com - PASSED

  1. Installed 1.62.92
  2. launched Brave
  3. visit https://bitmovin.com/demos/drm in a new tab page
  4. confirmed I got prompted to Install and run Google Widevine
  5. clicked Allow
  6. played the video for protected DRM stream
  7. opened brave://components
  8. confirmed Widevine Content Decryption Module is loaded
  9. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality (through visual inspection)

step 4 step 6
image image
brave://components widevinecdm.dll
image image

Netflix - PASSED

1.new profile
2. launched Brave
3. loaded netflix.com
4. clicked on the Sign In link
5. entered my credentials
6. clicked on the Sign In button
7. confirmed I got prompted to Install and run Widevine
8. clicked Allow
9. clicked on Brave QA avatar
10. played The Great National Parks
11. confirmed Widevine Content Decryption Module is loaded
12. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality (through visual inspection)

example example
image image
brave://components widevinecdm.dll
image image

Hbomax.com - PASSED

  1. new profile
  2. launched Brave
  3. loaded hbomax.com
  4. clicked on the Sign In button
  5. clicked Sign in to your account
  6. finally signed in
  7. clicked on my QA avatar
  8. clicked on Happy Feet to play
  9. confirmed I was prompted to Install and run Widevine
  10. confirmed Widevine Content Decryption Module is loaded
  11. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality, through visual inspection

example example
image image
brave://components widevinecdm.dll
image image

Case 2: with the commandline-parameters - --enable-features="BraveWidevineArm64DllFix:widevine_arm64_dll_template_url/https%3A%2F%2Fbrave.com%2Fnonexistent".

Bitmovin.com - PASSED

  1. Installed 1.62.92
  2. launched Brave with the commandline - --enable-features="BraveWidevineArm64DllFix:widevine_arm64_dll_template_url/https%3A%2F%2Fbrave.com%2Fnonexistent"
  3. visit https://bitmovin.com/demos/drm in a new tab page
  4. confirmed I got prompted to Install and run Google Widevine
  5. clicked Allow
  6. played the video for protected DRM stream
  7. opened brave://components
  8. confirmed Widevine Content Decryption Module is loaded
  9. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality (through visual inspection)

step 2 step 4 step 6
image image image
brave://components widevinecdm.dll
image image

Netflix - PASSED

1.new profile
2. launched Brave with the commandline - --enable-features="BraveWidevineArm64DllFix:widevine_arm64_dll_template_url/https%3A%2F%2Fbrave.com%2Fnonexistent"
3. loaded netflix.com
4. clicked on the Sign In link
5. entered my credentials
6. clicked on the Sign In button
7. confirmed I got prompted to Install and run Widevine
8. clicked Allow
9. clicked on Brave QA avatar
10. played Life on our planet
11. confirmed Widevine Content Decryption Module is loaded
12. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality (through visual inspection)

step 2 step 4 step 6
image image image
brave://components widevinecdm.dll
image image
C:\Program Files\BraveSoftware\Brave-Browser-Beta\Application>[23772:27060:1201/095224.727:ERROR:policy_logger.cc(156)] :components\enterprise\browser\controller\chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[23772:27060:1201/095224.758:WARNING:external_provider_impl.cc(514)] Malformed extension dictionary for extension: odbfpeeihdkbihmopkbjmoonfanlbfcl.  Key external_update_url has value "", which is not a valid URL.
tracing_subscriber - init success
[23772:27060:1201/095224.935:INFO:mod.rs(71)]   skus::sdk: skus sdk initialized, environment: production, version: "unknown"
[23772:27060:1201/095225.022:WARNING:CONSOLE(5)] "crbug/1173575, non-JS module files deprecated.", source: chrome://resources/js/load_time_data_deprecated.js (5)
[23772:27060:1201/095240.134:WARNING:CONSOLE(5)] "crbug/1173575, non-JS module files deprecated.", source: chrome://resources/js/load_time_data_deprecated.js (5)
[23772:27060:1201/095319.798:INFO:CONSOLE(0)] "Refused to apply style from 'https://www.netflix.com/personalization/cl2/freeform/WebsiteDetect?source=wwwhead&fetchType=css&modalView=nmLanding' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.", source: https://www.netflix.com/ (0)
[23772:27060:1201/095324.501:INFO:CONSOLE(0)] "Refused to apply style from 'https://www.netflix.com/personalization/cl2/freeform/WebsiteDetect?source=wwwhead&fetchType=css&modalView=login' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.", source: https://www.netflix.com/login (0)
[23772:27256:1201/095522.920:WARNING:widevine_cdm_component_installer.cc(208)] Guessed Widevine Arm64 ALL URL https://brave.com/nonexistent does not exist. Falling back to https://dl.google.com/widevine-cdm/4.10.2710.0-win-arm64.zip, which should exist but may not be compatible.

Hbomax.com - PASSED

  1. new profile
  2. launched Brave with the commandline - --enable-features="BraveWidevineArm64DllFix:widevine_arm64_dll_template_url/https%3A%2F%2Fbrave.com%2Fnonexistent"
  3. loaded hbomax.com
  4. clicked on the Sign In button
  5. clicked Sign in to your account
  6. finally signed in
  7. clicked on my QA avatar
  8. clicked on Happy Feet to play
  9. confirmed I was prompted to Install and run Widevine
  10. confirmed Widevine Content Decryption Module is loaded
  11. confirmed widevinecdm_proxy.dll is loaded when Widevine is installed

Confirmed the content was streamed in High-Definition (HD) quality, through visual inspection

step 2 example example
image image image
brave://components widevinecdm.dll
image image
[13920:16068:1201/101630.383:INFO:CONSOLE(1)] "It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior.", source: https://play.max.com/6529.0eb4a692d17a5b732d18.sha.js (1)
[13920:29184:1201/101705.127:WARNING:widevine_cdm_component_installer.cc(208)] Guessed Widevine Arm64 ALL URL https://brave.com/nonexistent does not exist. Falling back to https://dl.google.com/widevine-cdm/4.10.2710.0-win-arm64.zip, which should exist but may not be compatible.
[13920:16068:1201/101719.906:INFO:CONSOLE(1)] "It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior.", source: https://play.max.com/6529.0eb4a692d17a5b732d18.sha.js (1) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment