Desktop example youtube-dl broken

Bug #1570460 reported by Daniel Holbach
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Expired
Undecided
Unassigned
Snappy Desktop Examples
Expired
Undecided
Unassigned

Bug Description

Desktop example youtube-dl broken.

Trying to access /usr/bin/ffmpeg when called with arguments. When called with no arguments, tries to compile code!?

AppArmor denials when called with no arguments:

kernel: [67712.076292] audit: type=1400 audit(1460649001.991:3148): apparmor="DENIED" operation="open" profile="snap.youtube-dl.run" name="/proc/19911/mounts" pid=19911 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
kernel: [67712.321018] audit: type=1400 audit(1460649002.235:3149): apparmor="DENIED" operation="exec" profile="snap.youtube-dl.run" name="/sbin/ldconfig" pid=19912 comm="python3" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
kernel: [67712.332801] audit: type=1400 audit(1460649002.247:3150): apparmor="DENIED" operation="exec" profile="snap.youtube-dl.run" name="/usr/bin/gcc-5" pid=19914 comm="sh" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0
kernel: [67712.334547] audit: type=1400 audit(1460649002.247:3151): apparmor="DENIED" operation="exec" profile="snap.youtube-dl.run" name="/sbin/ldconfig" pid=19915 comm="python3" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

AppArmor denials when calls with arguments:
$ youtube-dl.run https://www.youtube.com/watch?v=auLBLk4ibAk
[youtube] auLBLk4ibAk: Downloading webpage
[youtube] auLBLk4ibAk: Downloading video info webpage
[youtube] auLBLk4ibAk: Extracting video information
ERROR: unable to open for writing: [Errno 13] Permission denied: 'Rush - Tom Sawyer-auLBLk4ibAk.webm.part'

kernel: [67951.598124] audit: type=1400 audit(1460649241.519:3187): apparmor="DENIED" operation="exec" profile="snap.youtube-dl.run" name="/usr/bin/ffmpeg" pid=21273 comm="youtube-dl" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

Package:
http://bazaar.launchpad.net/~snappers/snappy-desktop-examples/trunk/files/head:/youtube-dl

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The access to /usr/bin/ffmpeg indicates you were hitting bug #1570581 which is fixed now. I suspect that this app is not shipping ffmpeg in the snap. If it is, if you retest the ffmpeg denial should go away.

Changed in snappy:
status: New → Incomplete
Revision history for this message
Daniel Holbach (dholbach) wrote :

Confirmed. I'm adding ffmpeg to the branch. The only issue we now can still see is writing to CWD.

Revision history for this message
Daniel Holbach (dholbach) wrote :

It looks like dpm already added ffmpeg to the snapcraft.yaml - why do you build it from source though? Wouldn't

stage-packages: [ffmpeg]

be easier?

Revision history for this message
Daniel Holbach (dholbach) wrote :

I also can't seem to run it:
daniel@daydream:~/dev/snappy/snappy-desktop-examples/youtube-dl$ youtube-dl.run --help
/bin/sh: 0: Can't open /snap/youtube-dl/100002/command-run.wrapper
daniel@daydream:~/dev/snappy/snappy-desktop-examples/youtube-dl$

Revision history for this message
David Callé (davidc3) wrote :

Works fine here. Make sure to connect the "home" plug for allowing it to write the downloaded file.

$ sudo snap connect youtube-dl:home ubuntu-core:home

$ youtube-dl.run ytsearch:ubuntu
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[youtube:search] query "ubuntu": Downloading page 1
[download] Downloading playlist: ubuntu
[youtube:search] playlist ubuntu: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[youtube] fk7OBuoK7ig: Downloading webpage
[youtube] fk7OBuoK7ig: Downloading video info webpage
[youtube] fk7OBuoK7ig: Extracting video information
[youtube] fk7OBuoK7ig: Downloading MPD manifest
[download] Destination: Review_-_Ubuntu_15.04-fk7OBuoK7ig.mp4
[download] 5.9% of 55.15MiB at 865.03KiB/s ETA 01:01
[...]

Michael Vogt (mvo)
Changed in snappy-desktop-examples:
status: New → Incomplete
Revision history for this message
Jorge Castro (jorge) wrote :

I get this when trying to connect the plugs:

error: cannot perform the following tasks:
- Connect youtube-dl:home to ubuntu-core:home (cannot connect plug to slot "home" from snap "ubuntu-core", no such slot)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snappy Desktop Examples because there has been no activity for 60 days.]

Changed in snappy-desktop-examples:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snappy because there has been no activity for 60 days.]

Changed in snappy:
status: Incomplete → Expired
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.