question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When packing apps for the Windows Store, Widevine is not correctly loaded

See original GitHub issue

When you package an app for the windows store the folder:

%USERPROFILE%\AppData\Roaming\<app name>

Is virtualized in

%USERPROFILE%\AppData\Local\Pacakges\<windows package name>LocalCache\Roaming\<app name>

The WidevineCDM directory is then created under the virtulized folder, and on some computer, this makes widevine to not initialize corretly: the event ready is received but it is impossible to use any DRM protected content (e.g. Spotify SDK).

Manually moving the WidevineCDM directory from the virtualized folder to the “real” folder solves the issue. This didn’t happened with previous versions of Widevine/Electron (we used 4.1.5 without any issue; the problem started moving to electron 7.X).

Is it possible to configure the path to use for downloading the Widevine files, so that the access to that is direct and not somehow virtualized?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25

github_iconTop GitHub Comments

4reactions
delfinofcommented, Dec 18, 2019

I think dynamic downloading of WidevineCDM is allowed in the Windows Store because of this:

https://docs.microsoft.com/en-us/windows/uwp/publish/store-policies#102-security

10.2.2 Your product must not attempt to change or extend its described functionality through any form of dynamic inclusion of code that is in violation of Store Policies. Your product should not, for example, download a remote script and subsequently execute that script in a manner that is not consistent with the described functionality.

That is, as long as you don’t include code which changes described functionalities, you are ok.

On the other side, IMHO downloading Widevine in the home directory violates the principle at the beginning:

Don’t attempt to cheat customers, the system or the ecosystem.

Since it tries to circumvent the ecosystem concept of virtualization.

But my personal experience suggests that MS Store reviewers are usually open to exceptions if these are required to assure the app being able to work correctly

3reactions
khwaajcommented, Dec 18, 2019

Starting with v5.0.13 it will be possible to override baseDir immediately instead of separately overriding downloadDir, installDir, updateDir and lastDir. It will also be possible to do this using the widevine-base-dir command line switch. This will roll out to v6 and v7 as well in the next release of each release series and should be the preferred way to move the Widevine CDM out of AppData in cases like this.

For example, to use the equivalent of %USERPROFILE%\Widevine\<APP-NAME> as the base path you could do:

app.verifyWidevineCdm({
  baseDir: path.join(app.getPath('home'), 'Widevine', app.getName())
});

Or:

app.commandLine.appendSwitch('widevine-base-dir', path.join(app.getPath('home'), 'Widevine', app.getName()))
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems with apps from Microsoft Store
Run the troubleshooter: Select the Start button, and then select Settings > Update & Security > Troubleshoot, and then from the list select...
Read more >
DRM suddenly not working - Raspberry Pi Forums
I've reinstalled widevine several times, and even booted off a fresh install of rapsberry pi OS and widevine is still failing on everything...
Read more >
What is Google Widevine DRM? How Does Widevine Work?
Take an in-depth look at Google's Widevine DRM solution, its building blocks, and security levels, where Widevine DRM is supported, ...
Read more >
Fixed: Microsoft Store Page Could Not be Loaded | PC Error Fix
Seeing the error message #Pagecouldnotbeloaded. Please try again later in #MicrosoftStore while downloading or updating the #game or apps ...
Read more >
Web player help - Support - Spotify
If you see this message (or similar), you need to enable the Widevine plugin or download a media pack. Note: Enabling the plugin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found