Page 1 of 1

Firefox 67 and widevinecdm - Crash!

Posted: Fri Jun 07, 2019 11:55 pm
by SweetBearCub
Greetings.

I was trying to uninstall un-necessary media codecs (like flash, along with java), and I think that I may have accidentally uninstalled something that the DRM depends on to play content on sites like Amazon Video.

When I try, I get a yellow bar at the top of my screen stating that widevinecdm has crashed. Over and over.

How can I find out what dependencies it has, so that I can reinstall them?

Thanks!

Re: Firefox 67 and widevinecdm - Crash!

Posted: Sat Jun 08, 2019 8:48 am
by Flemur
SweetBearCub wrote:
Fri Jun 07, 2019 11:55 pm
When I try, I get a yellow bar at the top of my screen stating that widevinecdm has crashed. Over and over.
Is the error message actually
"The WidevineCdm plugin has crashed"
?

Re: Firefox 67 and widevinecdm - Crash!

Posted: Sat Jun 08, 2019 10:22 am
by SweetBearCub
Image
Flemur wrote:
Sat Jun 08, 2019 8:48 am
SweetBearCub wrote:
Fri Jun 07, 2019 11:55 pm
When I try, I get a yellow bar at the top of my screen stating that widevinecdm has crashed. Over and over.
Is the error message actually
"The WidevineCdm plugin has crashed"
?

Re: Firefox 67 and widevinecdm - Crash!

Posted: Sat Jun 08, 2019 7:08 pm
by karlchen
Hm, Widevinecdm seems to have a long history of mal-functioning and causing problems, at least based on the hits returned by a Google search.
Anyway.
I could imagine that in the current case, the problem is the one found in this Launchpad bug report: firefox plugin libwidevinecdm.so crashes due to apparmor denial.
The bug has been marked as [confirmed], but not as [resolved] till today.
So the only solution may still be following the steps given by Seth Arnold.

Re: Firefox 67 and widevinecdm - Crash!

Posted: Sat Jun 08, 2019 9:26 pm
by SweetBearCub
karlchen wrote:
Sat Jun 08, 2019 7:08 pm
Hm, Widevinecdm seems to have a long history of mal-functioning and causing problems, at least based on the hits returned by a Google search.
Anyway.
I could imagine that in the current case, the problem is the one found in this Launchpad bug report: firefox plugin libwidevinecdm.so crashes due to apparmor denial.
The bug has been marked as [confirmed], but not as [resolved] till today.
So the only solution may still be following the steps given by Seth Arnold.
Interesting.

I did try to watch another DRM video and then pull up my syslog, and this is the last firefox related entry that also called out WideVine. I'm not sure how to interpret the entries, other than it seems to be something that apparmor is blocking.

Code: Select all

Jun  8 18:17:09 mathan-70A4001LUX kernel: [212593.805378] audit: type=1400 audit(1560043029.621:1402): apparmor="DENIED" operation="file_mmap" profile="/usr/lib/firefox/firefox{,*[^s][^h]}" name="/home/mathan/.mozilla/firefox/ets2d9nu.default/gmp-widevinecdm/4.10.1196.0/libwidevinecdm.so" pid=2725 comm="plugin-containe" requested_mask="m" denied_mask="m" fsuid=1000 ouid=1000
So the linked solution says to add two lines to the "main body" of the apparmor profile. I have that loaded, but the file doesn't actually say "main body" it seems to have several sections. Where exactly should I add the two lines?

Re: Firefox 67 and widevinecdm - Crash!

Posted: Sun Jun 09, 2019 5:11 am
by karlchen
Hello, SweetBearCub.

I admit that the Launchpad post by Seth Arnold is not really too precise.
I inspected my own file /etc/apparmor.d/usr.bin.firefox on Ubuntu 18.04.2 (Mint 19.x is based on it).

In line 244 there is a comment that says the next entries are for (Firefox) Extensions

Code: Select all

  # Extensions
  # /usr/share/.../extensions/... is already covered by '/usr/** r', above.
  # Allow 'x' for downloaded extensions, but inherit policy for safety
  owner @{HOME}/.mozilla/**/extensions/** mixr,
Below the owner line, there are lines starting with the keyword deny.

As you want to permit widevinecdm, not deny it, I would try adding the 2 lines,

Code: Select all

ptrace (trace) peer=@{profile_name},
@{HOME}/.mozilla/firefox/*/gmp-widevinecdm/*/lib*so m,
right below the owner line.

Code: Select all

  # Extensions
  # /usr/share/.../extensions/... is already covered by '/usr/** r', above.
  # Allow 'x' for downloaded extensions, but inherit policy for safety
  owner @{HOME}/.mozilla/**/extensions/** mixr,
  ptrace (trace) peer=@{profile_name},
  @{HOME}/.mozilla/firefox/*/gmp-widevinecdm/*/lib*so m,
and then try enabling the change as explained by Seth Arnold, i.e. by executing the commandline

Code: Select all

apparmor_parser --replace /etc/apparmor.d/usr.bin.firefox
Regards,
Karl