Netflix Desktop requires custom Wine build

Bug #1087063 reported by Erich E. Hoover
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netflix Desktop
Triaged
Low
Erich E. Hoover
Wine
Confirmed
Medium

Bug Description

It is inconvenient for users to download a complete custom Wine build just to use Netflix Desktop. The patches needed to get Silverlight working in Wine should be included in vanilla Wine in order to remove this dependency.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

Netflix generates an error "Internet Connection Problem" (N8156-6022) when attempting to play movies.

Steps to reproduce:
0) Create a new Wine prefix and do not install Mono
1) Apply attachment 41923 to work around Bug #31589.
2) Download and install a recent Windows version of Firefox:
wget -O Firefox-14.0.1.exe
http://download.mozilla.org/?product=firefox-14.0.1-funnelcake13&os=win&lang=en-US;
wine Firefox-14.0.1.exe
3) Launch Firefox
4) Download the Silverlight 4.x installer from within Wine Firefox ( http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0 ). Due to Bug #31754 you should not install Silverlight 5.x
5) Click "Save File" to save the Silverlight installer
6) Double click the "Silverlight.exe" file in the download window and click
"Ok"
7) Click "Install now"
8) Uncheck "Enable Microsoft Update" and click "Next>" and then click "Close"
9) Login to Netflix and attempt to play a movie/show

possibly relevant console information:
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000" 1 1 0x66025f0 (nil) (nil) (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000" 1 4 (nil) (nil) 0x656c128 (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\." 1 1 0x66025f0 (nil) (nil) (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\." 1 4 (nil) (nil) 0x656c128 (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\.." 1 1 0x66025f0 (nil) (nil) (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\.." 1 4 (nil) (nil) 0x656c128 (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\MSPRindiv01.key" 1 1 0x66025f0 (nil) (nil) (nil)
fixme:advapi:SetNamedSecurityInfoW L"\\\\?\\C:\\users\\Public\\Application Data\\Microsoft\\PlayReady\\Cache\\S-1-5-21-0-0-0-1000\\MSPRindiv01.key" 1 4 (nil) (nil) 0x656c128 (nil)

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

Now that Bug #31754 is fixed I should mention that it's still necessary to use Silverlight 4.x, for some reason Silverlight 5.x does not fill out the entire "Cache" profile directory.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

(In reply to comment #1)
> Now that Bug #31754 is fixed I should mention that it's still necessary to use
> Silverlight 4.x, for some reason Silverlight 5.x does not fill out the entire
> "Cache" profile directory.

I've opened a separate bug for the Silverlight 5.x individualization problem (Bug #31881). Now that Bug #31589 is fixed it's possible to load the PlayReady stream at this website the first time the page loads:
http://web.sldrm.video.msn.com/d1/sldrm.html

So, I think the problem might be retaining credentials so that they can be reused for an already-approved file.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

Created attachment 42081
Hack to work around Internet Connection Problem

Ok, I have a clue as to the source of the problem. It appears that PlayReady is either improperly detecting that whether it's already running or it's supposed to be able to delete the individualization file _while it's loaded in memory_. The attached hack deletes the individualization file at the appropriate time (right before attempting to delete the folder it's in) so that Netflix can continue to 100%. However, the application will stall at 100% - so we're not all the way there yet.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

I suspect that this has something to do with the file's modification time, as I can "reproduce" this issue on Windows by changing the "modification time" of
C:\users\Public\Application Data\Microsoft\Cache\indiv01.key
after loading the page http://web.sldrm.video.msn.com/d1/sldrm.html and before hitting "Load selected media!" (the work around allows this to function). It's worth noting that I cannot change file times on
C:\users\Public\Application Data\Microsoft\Cache\S-1-5-21-0-0-0-1000/MSPRindiv01.key
while Silverlight is running (since the file is in use).

Also, I have a little trick for narrowing down the log (for Netflix, not for the above website):
cat netflix.log | grep -A 999999 status_acquiring_license_lsc | grep -B 999999 status_fatal_error_ls > netflix-error.log

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

Created attachment 42171
Fix for the Internet Connection Problem

Ok, I believe I've come up with a fix for this issue. I would appreciate any comments people have on this patch, the ACL part was particularly tricky and I'm not very familiar with that portion of the API. There are essentially three parts to this patch:
1) Returning the current user as the file owner
2) Returning the current user and the administrators group in the DACL
3) Saving nanosecond precision filetimes (CopyFile does not currently save the correct filetime)

It's worth noting that the attached patch just gets the loading bar to 100% for Netflix (it still won't actually play). I have some other PlayReady websites working (such as http://web.sldrm.video.msn.com/d1/sldrm.html), but it appears that only "Progressive Download" mode data works - "Streaming" mode still has problems.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

Created attachment 42172
Fix for the Internet Connection Problem [v2]

(In reply to comment #5)
> Created attachment 42171 [details]
> Fix for the Internet Connection Problem
> ...

Whoops, had an order of operations mistake in the time calculation - the newly attached version fixes this issue.

Revision history for this message
In , Bobby Powers (bobbypowers) wrote :

so I applied your patch on top of the current HEAD (1d3f679e). The time parts failed, but I see that you applied those as a separate patch on the 26th, so no big deal.

I should note that I also have the pulseaudio (git://repo.or.cz/wine/multimedia.git) branch merged in.

With this patch, and the winetricks wininet override, netflix audio, video and fullscreen works!

(In reply to comment #6)
> Created attachment 42172 [details]
> Fix for the Internet Connection Problem [v2]
>
> (In reply to comment #5)
> > Created attachment 42171 [details]
> > Fix for the Internet Connection Problem
> > ...
>
> Whoops, had an order of operations mistake in the time calculation - the newly
> attached version fixes this issue.

Revision history for this message
In , Bobby Powers (bobbypowers) wrote :

I'm new to the wine codebase, but I'm going to spend a little time looking at my logs to see if I can figure out any specifics about why the override works but pure wine doesnt.

Revision history for this message
In , Erich E. Hoover (ehoover) wrote :

(In reply to comment #8)
> I'm new to the wine codebase, but I'm going to spend a little time looking at
> my logs to see if I can figure out any specifics about why the override works
> but pure wine doesnt.

That's Bug #31993, my latest patches are:
[1/3] http://source.winehq.org/patches/data/91569
[2/3] http://source.winehq.org/patches/data/91570
[3/3] http://source.winehq.org/patches/data/91571

With those three patches Netflix will work without an override.

Revision history for this message
In , Bobby Powers (bobbypowers) wrote :

Created attachment 42361
diff between wine-provided and winetricks wininet

I ran firefox (16.0.2) from the command line and saved the logs, with and without the override. I then ran each log through uniq, since there were a lot of repeated messages, and diffed them:

    git diff --no-index pure.log wininet.log >~/wininet.diff

I'm afraid nothing pops out at me, but maybe they're useful for someone else. I'm happy to test further patches or to poke around if someone points me in the right direction, but I'm not really sure where to go from here.

Revision history for this message
In , Bobby Powers (bobbypowers) wrote :

(In reply to comment #9)
> (In reply to comment #8)
> > I'm new to the wine codebase, but I'm going to spend a little time looking at
> > my logs to see if I can figure out any specifics about why the override works
> > but pure wine doesnt.
>
> That's Bug #31993, my latest patches are:
> [1/3] http://source.winehq.org/patches/data/91569
> [2/3] http://source.winehq.org/patches/data/91570
> [3/3] http://source.winehq.org/patches/data/91571
>
> With those three patches Netflix will work without an override.

I will follow up on that bug.

Revision history for this message
In , Andrew Riker (andrew-thomas-riker) wrote :

Congratulations on getting Netflix working! Already good excitement for it on several pages.

Changed in wine:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Scott Ritchie (scottritchie) wrote :

It may be reasonable to add wine1.5 (or possibly 1.6) to the archive during the Raring cycle, these patches included. I suspect we'll hear about release timing at wineconf in February.

Revision history for this message
Erich E. Hoover (ehoover) wrote :

That would be great, though I do need to get the patches accepted first :) I'm working on fixing some minor regressions that got introduced from redoing [Get|Set]NamedSecurityInfo, but once that's all fixed then I'll be back on trying to get the patches accepted.

Changed in netflix-desktop:
status: New → Incomplete
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.