I am from Opera and we noticed that Opera stops working today after updating to use core18 to snap Opera.
$ opera
You need to connect this snap to the gnome platform snap.
You can do this with those commands:
snap install gnome-3-28-1804
snap connect opera:gnome-3-28-1804 gnome-3-28-1804
On my machine, I can solve the issue by running the following commands:
sudo snap refresh core18 --candidate
sudo snap revert opera
sudo snap refresh opera
Should we request an auto-connection for gnome-3-28-1804?
We already reverted Opera on the store. The snap.yaml with this issue is attached below.
$ cat /snap/opera/current/meta/snap.yaml
name: opera
version: 65.0.3467.38
summary: Fast and secure web browser
description: |
Opera is a fast, secure, and user-friendly web browser.
It includes a built-in ad blocker, Video pop-out, and free VPN.
base: core18
architectures:
- amd64
confinement: strict
grade: stable
plugs:
browser-sandbox:
allow-sandbox: true
interface: browser-support
chromium-ffmpeg-93464:
default-provider: chromium-ffmpeg
interface: content
target: $SNAP
gnome-3-28-1804:
default-provider: gnome-3-28-1804
interface: content
target: $SNAP/gnome-platform
gtk-3-themes:
default-provider: gtk-common-themes
interface: content
target: $SNAP/data-dir/themes
icon-themes:
default-provider: gtk-common-themes
interface: content
target: $SNAP/data-dir/icons
sound-themes:
default-provider: gtk-common-themes
interface: content
target: $SNAP/data-dir/sounds
apps:
opera:
command: snap/command-chain/snapcraft-runner $SNAP/command-opera.wrapper
environment:
DISABLE_WAYLAND: 1
plugs:
- audio-playback
- avahi-observe
- browser-sandbox
- camera
- cups-control
- desktop
- desktop-legacy
- gsettings
- home
- mount-observe
- network
- network-control
- network-manager
- opengl
- password-manager-service
- process-control
- pulseaudio
- screen-inhibit-control
- unity7
- upower-observe
- wayland
- x11
With this change, we no longer see the complain about connecting gnome-3-28-1804. However, some machines have an error about GdkPixbuf instead:
(opera-developer:8796): GLib-GIO-CRITICAL **: 08:56:32.295: g_settings_schema_source_lookup: assertion 'source != NULL' failed
CrashID=63211784-b19b-4ccc-805b-9f0e02191119
Fontconfig error: Cannot load default config file
(opera-developer:8849): GdkPixbuf-WARNING **: 08:56:32.529: Cannot open pixbuf loader module file '/home/radek/snap/opera-developer/common/.cache/gdk-pixbuf-loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /home/radek/snap/opera-developer/common/.cache/gdk-pixbuf-loaders.cache
to make things work again for the time being.
Gtk-Message: 08:56:32.554: Failed to load module "canberra-gtk-module"
Gtk-Message: 08:56:32.555: Failed to load module "canberra-gtk-module"
(opera-developer:8849): GLib-GIO-CRITICAL **: 08:56:32.574: g_settings_schema_source_lookup: assertion 'source != NULL' failed
libGL error: MESA-LOADER: failed to open r600 (search paths /snap/opera-developer/76/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: r600
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/opera-developer/76/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
[8884:8884:1119/085632.649742:ERROR:gl_context_glx.cc(187)] Failed to create GL context with glXCreateNewContext.
[8884:8884:1119/085632.649804:ERROR:gpu_info_collector.cc(74)] gl::init::CreateGLContext failed
[8884:8884:1119/085632.649812:ERROR:gpu_info_collector.cc(206)] Could not create context for info collection.
[8884:8884:1119/085632.649826:ERROR:gpu_init.cc(66)] gpu::CollectGraphicsInfo failed.
[8884:8884:1119/085632.651411:ERROR:viz_main_impl.cc(180)] Exiting GPU process due to errors during initialization
(opera-developer:8849): GLib-GIO-ERROR **: 08:56:32.652: No GSettings schemas are installed on the system
CrashID=07642cad-914c-4e8d-83ce-091892191119
[8834:8837:1119/085632.866063:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)
CrashID=6b238ad7-3afc-43fd-96ff-ab2512191119
[8887:8890:1119/085633.340861:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)
Does anyone know about this? Any idea will be appreciated.
@xshi on the machines complaining about the missing gdk-pixbuf-loaders.cache, please rm -rf ~/snap/opera (or ~/snap/opera-developer, whichever is broken), and try relaunch the snap. It sounds like the cache may have gotten corrupted in one of your install cycles during testing.
@marcustomlinson Thanks for your reply. I removed the opera folder (~/snap/opera-developer in my case) but it doesn’t help. I noticed that the folder ~/snap/opera-developer/common is empty on the machines that Opera does work, but it is not on a failing machine (I can only check one currently). I am not sure if this is relevant.
You mean you remove ~/snap/opera-developer then run the snap and on some machines ~/snap/opera-developer/common is repopulated, and on some it isn’t?
Could it be that you think nothing’s there but really there is a hidden .cache folder present?
You are right. ~/snap/opera-developer/common on all machines has content. Sorry I had that wrong conclusion (not all ll alias includes -a). But removing ~/snap/opera-developer folder or reinstall the snap package doesn’t resolve the issue.
Looking through logs, I notice these error in the first run after I reinstall the snap package:
cp: cannot stat '/snap/opera-developer/78/gnome-platform/usr/share/mime': No such file or directory
Directory '/home/opera/snap/opera-developer/78/.local/share/mime/packages' does not exist!
/snap/opera-developer/78/snap/command-chain/desktop-launch: line 11: /snap/opera-developer/78/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: No such file or directory
ERROR: update-mime-database /home/opera/snap/opera-developer/78/.local/share/mime exited abnormally with status 1
ERROR: /snap/opera-developer/78/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
Fontconfig error: Cannot load default config file
And here is a template for generating the snapcraft.yaml for different stream of opera:
name: {{ filesystem_name }}
version: {{ major }}.{{ minor }}.{{ nightly }}.{{ patch }}
summary: Fast and secure web browser
description: |
Opera is a fast, secure, and user-friendly web browser.
It includes a built-in ad blocker, Video pop-out, and free VPN.
architectures:
- amd64
base: core18
confinement: strict
grade: stable
plugs:
browser-sandbox:
allow-sandbox: true
interface: browser-support
# We need to specify the chromium-ffmpeg interface slot for Opera. When a snap
# version Opera cannot play H.264 videos while the debian version can,
# consider update to the latest interface slot first. A slot version may also
# be removed from chromium-ffmpeg. In this case, we can do
# `snap revert chromium-ffmpeg` as a workaround.
#
# For a new interface slot, we need to connect it manually for testing:
# snap connect opera-developer:<slot> chromium-ffmpeg:<slot>
# And before we publish it, we need to ask Ubuntu team to create an
# auto-connect exception for Opera.
chromium-ffmpeg-93464:
interface: content
target: $SNAP
default-provider: chromium-ffmpeg
apps:
{{ filesystem_name }}:
command: bin/{{ filesystem_name }}.launcher
desktop: usr/share/applications/{{ filesystem_name }}.desktop
environment:
DISABLE_WAYLAND: 1
extensions: [gnome-3-28]
slots:
- dbus-daemon
plugs:
- audio-playback
- avahi-observe
- browser-sandbox
- camera
- cups-control
- desktop
- desktop-legacy
- gsettings
- home
- mount-observe
- network
- network-control
- network-manager
- opengl
- password-manager-service
- process-control
- pulseaudio
- screen-inhibit-control
- unity7
- upower-observe
- wayland
- x11
parts:
browser:
plugin: dump
source: data
stage-packages:
- libasound2
- libatk-bridge2.0-0
- libatk1.0-0
- libatspi2.0-0
- libcairo-gobject2
- libcairo2
- libcups2
- libcurl3
- libdatrie1
- libepoxy0
- libfontconfig1
- libfreetype6
- libgconf-2-4
- libgl1-mesa-glx
- libglu1-mesa
- libgnome-keyring0
- libgpm2
- libgraphite2-3
- libgtk-3-0
- libharfbuzz0b
- libnotify4
- libnspr4
- libnss3
- libpango-1.0-0
- libpangocairo-1.0-0
- libpangoft2-1.0-0
- libpixman-1-0
- libpulse0
- libsecret-1-0
- libthai0
- libwayland-client0
- libwayland-cursor0
- libwayland-egl1
- libxcb-render0
- libxcb-shm0
- libxcomposite1
- libxcursor1
- libxi6
- libxinerama1
- libxkbcommon0
- libxrandr2
- libxrender1
- libxss1
- libxtst6
override-build: |
snapcraftctl build
chmod 4755 $SNAPCRAFT_PART_INSTALL/{{ target_dir }}/{{ filesystem_name }}/opera_sandbox
slots:
dbus-daemon:
interface: dbus
bus: session
name: com.opera.{{ filesystem_name }}
I first ran these four commands and installed build 75, which is using the legacy desktop support. I got the issue about connection to gnome-3-28-1804 (my initial issue).
Then I ran the four commands again and this time I install the edge one (build 78). Unfortunately, I still get the issue about gdk-pixbuf-loaders.cache.
/snap/gnome-3-28-1804/current/usr/share/mime does exits.
The machine has kernel 5.0.0-25-generic, which is older than the working machine. I will try upgrading it tomorrow.
Sorry I can’t follow up the issue for a long time. I am wondering what do you meant by “permissions issue”? It’s about the user permission to some path or it’s related to snap’s confinement?
I installed a new 18.04 VM and I can reproduce this issue there.
The folder /snap/gnome-3-28-1804/current/usr/share/mime on VM contains much less data comparing to my working machine.
However, after updating the system through Software Updater and restart, Opera is finally running if I update the system through Software Updater, and manually connect gnome-3-28-1804 interface: