Gallery app doesn't show thumbnails on Pinephone due to AppArmor policy
The gallery app doesn't show thumbnails of any pictures on my Pinephone. It does seem to detect all the files in ~/Pictures, because they do get added. But instead of a thumbnail, a black square with the gallery icon is shown everywhere. Tapping those squares does result in the actual picture being shown.
According to the logs, it's an AppArmor policy that's forbidding the thumbnail process to access the jpg's.
Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000007.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000007.jpg
Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000008.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000008.jpg
file:///usr/share/click/preinstalled/com.ubuntu.gallery/2.10.6/rc/qml/OrganicView/OrganicMediaList.qml:178:25: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000007.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000007.jpg
file:///usr/share/click/preinstalled/com.ubuntu.gallery/2.10.6/rc/qml/OrganicView/OrganicMediaList.qml:178:25: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000008.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000008.jpg
Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000009.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000009.jpg
file:///usr/share/click/preinstalled/com.ubuntu.gallery/2.10.6/rc/qml/OrganicView/OrganicMediaList.qml:178:25: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000009.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000009.jpg
Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000010.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000010.jpg
file:///usr/share/click/preinstalled/com.ubuntu.gallery/2.10.6/rc/qml/OrganicView/OrganicMediaList.qml:178:25: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000010.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000010.jpg
Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000011.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000011.jpg
file:///usr/share/click/preinstalled/com.ubuntu.gallery/2.10.6/rc/qml/OrganicView/OrganicMediaList.qml:178:25: QML QQuickImage: Thumbnailer: RequestImpl::dbusCallFinished(): D-Bus error: Handler::gotCredentials(): thumbnail: /home/phablet/Pictures/com.ubuntu.camera/IMG_00000011.jpg (266,266): LocalThumbnailRequest::fetch(): AppArmor policy forbids access to /home/phablet/Pictures/com.ubuntu.camera/IMG_00000011.jpg