Can't play an audio shipped with the application click package
Ok. When this issue is mentioned in the Telegram group, the error mentioned leads me to think that this issue and [1] is something else. Turns out, the error has nothing to do with [1]. However, the error is an issue in itself as well. So, use this issue to specifically track that error, and let's use [1] for the original issue.
[1] ubports/development/apps/lomiri-clock-app#183 (closed)
The original description follows.
This issue described for clock app does also affect other apps for instance Timer app. Only the OS default alarm sound ("alarm clock"is played, although other sounds are selected via UI.
When testing for timer app, I got an error, that suggests that this might be due to some apparmor restrictions for sound file access:
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: ** Media playback error: "Warning: Failed to authenticate necessary apparmor permissions to open uri: Client is not allowed to access: file:///opt/click.ubuntu.com/timer.danfro/2.2.1.1/Timer/sounds/Buzz.ogg"
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: lomiri::MediaHub::DBusUtils::waitForFinished(const QDBusPendingCall&)::<lambda(QDBusPendingCallWatcher*)> QDBusError("mpris.Player.Error.InsufficientAppArmorPermissions", "Warning: Failed to authenticate necessary apparmor permissions to open uri: Client is not allowed to access: file:///opt/click.ubuntu.com/timer.danfro/2.2.1.1/Timer/sounds/Buzz.ogg")
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: Setting media to: QUrl("file:///opt/click.ubuntu.com/timer.danfro/2.2.1.1/Timer/sounds/Buzz.ogg")
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: setMedia() headers empty: true
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: setMedia() media: QUrl("file:///opt/click.ubuntu.com/timer.danfro/2.2.1.1/Timer/sounds/Buzz.ogg")
May 11 22:52:42 ubuntu-phablet aa-exec[5871]: virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)```
Edited by Ratchanan Srirattanamet