Won't play music inside unity8 snap because of unknown application ID

Bug #1642611 reported by Michael Terry
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
In Progress
High
Jim Hodapp
media-hub (Ubuntu)
Fix Committed
High
Unassigned

Bug Description

In the unity8 snap I've been working on, I tried to play music from unity8-dash. And it doesn't do anything. Media Hub gives an error about "Invalid profile name". Seemingly from the code in apparmor/ubuntu.cpp:

    MH_DEBUG("apparmor profile name: %s", name);
    MH_DEBUG("is_unconfined(): %s", (is_unconfined() ? "true" : "false"));
    MH_DEBUG("has_package_name(): %s", (has_package_name() ? "true" : "false"));
    if (not is_unconfined() and not is_unity() and not has_package_name())
        throw std::logic_error
        {
            "apparmor::ubuntu::Context: Invalid profile name " + str()
        };

For the unity8 snap, I see:

[DD 2016-11-16 20:54:00.782937] [ubuntu.cpp:111@Context] apparmor profile name: snap.unity8-session.unity8-session
[DD 2016-11-16 20:54:00.782992] [ubuntu.cpp:112@Context] is_unconfined(): false
[DD 2016-11-16 20:54:00.783028] [ubuntu.cpp:113@Context] has_package_name(): false
Error while executing the underlying io_service: apparmor::ubuntu::Context: Invalid profile name snap.unity8-session.unity8-session

It seems like media-hub is not prepared for this new snappy world.

(Also, and separately, media-hub doesn't have a non-android video backend? I assume that's a known issue and/or there's a bug for that already.)

Related branches

Changed in canonical-devices-system-image:
assignee: nobody → Jim Hodapp (jhodapp)
importance: Undecided → High
milestone: none → p1
status: New → In Progress
Changed in media-hub (Ubuntu):
assignee: nobody → Albert Astals Cid (aacid)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

adding chunsang per the held MR

Changed in canonical-devices-system-image:
milestone: p1 → p2
Changed in media-hub (Ubuntu):
assignee: Albert Astals Cid (aacid) → Chunsang Jeong (chunsang)
Revision history for this message
Chunsang Jeong (chunsang) wrote :

I don't know where's right place to put the MR but without this, media-hub-server fails and it makes unity8-dash restart.

"Error while executing the underlying io_service: apparmor::ubuntu::Context: Invalid profile name snap.unity8-session.unity8-session"

Revision history for this message
Chunsang Jeong (chunsang) wrote :

Patch below is also needed to play local music files thru media-hub to resolve permission error.
http://bazaar.launchpad.net/~chunsang/media-hub/unity8_include_media-hub/revision/213

"[track_list_skeleton.cpp:205@operator()] Warning: Not adding track file:///root/snap/unity8-session/common/Music/sample.mp3 to TrackList because of inadequate client apparmor permissions." from media-hub
"Failed to add 1 tracks to playlist: mpris.TrackList.Error.InsufficientPermissionsToAddTrack: Warning: Not adding track file:///root/snap/unity8-session/common/Music/sample.mp3 to TrackList because of inadequate client apparmor permissions." from unity8-dash

Revision history for this message
Chunsang Jeong (chunsang) wrote :

The prebuilt image with media-hub patches along with unity8-session modification, to play audio files at;
https://private-fileshare.canonical.com/~chunsang/media-hub/unity8-session_16.04_amd64.snap

Revision history for this message
Chunsang Jeong (chunsang) wrote :

Patches including were already merged.

Changed in media-hub (Ubuntu):
status: In Progress → Fix Committed
Changed in media-hub (Ubuntu):
assignee: Chunsang Jeong (chunsang) → nobody
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.