snapped app with qtwebengine fails to run

Bug #1836206 reported by Grzegorz Mazur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

I've tried to snap a simple Qt application making use of QtWebEngine (see https://github.com/grzegorzmazur/qtwebengine_snap). Building the snap according to the documentation on snapping Qt applications seems to work well, but attempt to run the application produces:

Qt: Session management error: None of the authentication protocols specified are supported
libpng warning: iCCP: known incorrect sRGB profile
Could not find QtWebEngineProcess
Aborted (core dumped)

Manually setting

export QTWEBENGINEPROCESS_PATH=/snap/qtwebengine-snap/current/usr/lib/x86_64-linux-gnu/qt5/libexec/QtWebEngineProcess

results in

Qt: Session management error: None of the authentication protocols specified are supported
libpng warning: iCCP: known incorrect sRGB profile
Installed Qt WebEngine locales directory not found at location /usr/share/qt5/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /snap/qtwebengine-snap/x1/bin/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/home/mazur/snap/qtwebengine-snap/x1/.qtwebengine_snap'
Qt WebEngine resources not found at /usr/share/qt5/resources. Trying parent directory...
Qt WebEngine resources not found at /usr/share/qt5. Trying application directory...
Qt WebEngine resources not found at /snap/qtwebengine-snap/x1/bin. Trying fallback directory... The application MAY NOT work.
[0711/152354.110396:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.qtwebengine_snap/qtwebengine_resources.pak
Some features may not be available.
[0711/152354.119717:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.qtwebengine_snap/qtwebengine_resources_100p.pak
Some features may not be available.
[0711/152354.119751:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.qtwebengine_snap/qtwebengine_resources_200p.pak
Some features may not be available.
[0711/152354.233507:WARNING:resource_bundle_qt.cpp(115)] locale_file_path.empty() for locale
[23311:23311:0711/152354.379528:FATAL:credentials.cc(155)] Check failed: NamespaceUtils::DenySetgroups(). : Permission denied
#0 0x7f883de2daee <unknown>
#1 0x7f883de400e2 <unknown>
#2 0x7f883de4145c <unknown>
#3 0x7f883e9b5b21 <unknown>
#4 0x7f883e9b62dd <unknown>
#5 0x7f883da4a527 <unknown>
#6 0x7f883d6f5d48 <unknown>
#7 0x7f883d6f9262 <unknown>
#8 0x7f883d4e7a9b <unknown>
#9 0x7f883d4e8bd5 <unknown>
#10 0x7f883d4d7bdd <unknown>
#11 0x7f883d4d7f0e QtWebEngineCore::WebContentsAdapter::WebContentsAdapter()
#12 0x7f8845342091 <unknown>
#13 0x7f8845342c04 QWebEnginePage::QWebEnginePage()
#14 0x7f8845351cfb QWebEngineView::page()
#15 0x7f8845352751 QWebEngineView::showEvent()
#16 0x7f8844c6f038 QWidget::event()
#17 0x7f8845352609 QWebEngineView::event()
#18 0x7f8844c3082c QApplicationPrivate::notify_helper()
#19 0x7f8844c380f4 QApplication::notify()
#20 0x7f8843eb29a8 QCoreApplication::notifyInternal2()
#21 0x7f8844c6bf08 QWidgetPrivate::show_helper()
#22 0x7f8844c6ebdb QWidget::setVisible()
#23 0x7f8844c6be30 QWidgetPrivate::showChildren()
#24 0x7f8844c6bedf QWidgetPrivate::show_helper()
#25 0x7f8844c6ebdb QWidget::setVisible()
#26 0x7f8844c6be30 QWidgetPrivate::showChildren()
#27 0x7f8844c6bedf QWidgetPrivate::show_helper()
#28 0x7f8844c6ebdb QWidget::setVisible()
#29 0x55ee0519d12d <unknown>
#30 0x7f88432b7b97 __libc_start_main
#31 0x55ee0519d1ea <unknown>

Installed Qt WebEngine locales directory not found at location /usr/share/qt5/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /snap/qtwebengine-snap/x1/usr/lib/x86_64-linux-gnu/qt5/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/home/mazur/snap/qtwebengine-snap/x1/.QtWebEngineProcess'
Qt WebEngine resources not found at /usr/share/qt5/resources. Trying parent directory...
Qt WebEngine resources not found at /usr/share/qt5. Trying application directory...
Qt WebEngine resources not found at /snap/qtwebengine-snap/x1/usr/lib/x86_64-linux-gnu/qt5/libexec. Trying fallback directory... The application MAY NOT work.
[0711/152354.976594:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.QtWebEngineProcess/qtwebengine_resources.pak
Some features may not be available.
[0711/152354.979154:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.QtWebEngineProcess/qtwebengine_resources_100p.pak
Some features may not be available.
[0711/152354.979172:ERROR:resource_bundle.cc(759)] Failed to load /home/mazur/snap/qtwebengine-snap/x1/.QtWebEngineProcess/qtwebengine_resources_200p.pak
Some features may not be available.
[0711/152354.980096:WARNING:resource_bundle_qt.cpp(115)] locale_file_path.empty() for locale
[23190:23190:0711/152355.520588:FATAL:service_manager_context.cc(230)] Check failed: !contents.empty().
#0 0x7f883de2daee <unknown>
#1 0x7f883de400e2 <unknown>
#2 0x7f883d97d5bb <unknown>
#3 0x7f883d6f69cb <unknown>
#4 0x7f883d6f7e83 <unknown>
#5 0x7f883da0a9e9 <unknown>
#6 0x7f883d6f401b <unknown>
#7 0x7f883d6f92dc <unknown>
#8 0x7f883d4e7a9b <unknown>
#9 0x7f883d4e8bd5 <unknown>
#10 0x7f883d4d7bdd <unknown>
#11 0x7f883d4d7f0e QtWebEngineCore::WebContentsAdapter::WebContentsAdapter()
#12 0x7f8845342091 <unknown>
#13 0x7f8845342c04 QWebEnginePage::QWebEnginePage()
#14 0x7f8845351cfb QWebEngineView::page()
#15 0x7f8845352751 QWebEngineView::showEvent()
#16 0x7f8844c6f038 QWidget::event()
#17 0x7f8845352609 QWebEngineView::event()
#18 0x7f8844c3082c QApplicationPrivate::notify_helper()
#19 0x7f8844c380f4 QApplication::notify()
#20 0x7f8843eb29a8 QCoreApplication::notifyInternal2()
#21 0x7f8844c6bf08 QWidgetPrivate::show_helper()
#22 0x7f8844c6ebdb QWidget::setVisible()
#23 0x7f8844c6be30 QWidgetPrivate::showChildren()
#24 0x7f8844c6bedf QWidgetPrivate::show_helper()
#25 0x7f8844c6ebdb QWidget::setVisible()
#26 0x7f8844c6be30 QWidgetPrivate::showChildren()
#27 0x7f8844c6bedf QWidgetPrivate::show_helper()
#28 0x7f8844c6ebdb QWidget::setVisible()
#29 0x55ee0519d12d <unknown>
#30 0x7f88432b7b97 __libc_start_main
#31 0x55ee0519d1ea <unknown>

Aborted (core dumped)

All in all, there seems to be no (documented?) way of snapping an application using QtWebEngine.

Revision history for this message
Grzegorz Mazur (teoretyk) wrote :
Revision history for this message
Marc Peña (pachulo) wrote :

I'm having the same problem trying to snap the new version of nextcloud-client.

I've tried to solve it with a modification of snapcraft-desktop-helpers:
https://github.com/pachulo/snapcraft-desktop-helpers/commit/356dc11c0f374b3e30647d36554d4c4089670db5

But the result is the same.

Revision history for this message
Marc Peña (pachulo) wrote :

OK, I think I found a workaround: my snap started working after using this layout (more info here https://forum.snapcraft.io/t/layouts-re-mapping-snap-directories/1471):

layout:
    /usr/share/qt5:
        bind: $SNAP/usr/share/qt5

Let me know if it works for you too @teoretyk!

Revision history for this message
Grzegorz Mazur (teoretyk) wrote :
Download full text (3.5 KiB)

Marc, this is absolutely brilliant :) The layout specification apparently solves the Qt WebEngine resources issue. Unfortunately, the application still fails. After applying your fixes I get:

Qt: Session management error: None of the authentication protocols specified are supported
libpng warning: iCCP: known incorrect sRGB profile
[19042:19042:0724/145919.738713:FATAL:credentials.cc(155)] Check failed: NamespaceUtils::DenySetgroups(). : Permission denied
#0 0x7f514362caee <unknown>
#1 0x7f514363f0e2 <unknown>
#2 0x7f514364045c <unknown>
#3 0x7f51441b4b21 <unknown>
#4 0x7f51441b52dd <unknown>
#5 0x7f5143249527 <unknown>
#6 0x7f5142ef4d48 <unknown>
#7 0x7f5142ef8262 <unknown>
#8 0x7f5142ce6a9b <unknown>
#9 0x7f5142ce7bd5 <unknown>
#10 0x7f5142cd6bdd <unknown>
#11 0x7f5142cd6f0e QtWebEngineCore::WebContentsAdapter::WebContentsAdapter()
#12 0x7f514ab41091 <unknown>
#13 0x7f514ab41c04 QWebEnginePage::QWebEnginePage()
#14 0x7f514ab50cfb QWebEngineView::page()
#15 0x7f514ab51751 QWebEngineView::showEvent()
#16 0x7f514a46e038 QWidget::event()
#17 0x7f514ab51609 QWebEngineView::event()
#18 0x7f514a42f82c QApplicationPrivate::notify_helper()
#19 0x7f514a4370f4 QApplication::notify()
#20 0x7f51496b19a8 QCoreApplication::notifyInternal2()
#21 0x7f514a46af08 QWidgetPrivate::show_helper()
#22 0x7f514a46dbdb QWidget::setVisible()
#23 0x7f514a46ae30 QWidgetPrivate::showChildren()
#24 0x7f514a46aedf QWidgetPrivate::show_helper()
#25 0x7f514a46dbdb QWidget::setVisible()
#26 0x7f514a46ae30 QWidgetPrivate::showChildren()
#27 0x7f514a46aedf QWidgetPrivate::show_helper()
#28 0x7f514a46dbdb QWidget::setVisible()
#29 0x55efada7f12d <unknown>
#30 0x7f5148ab6b97 __libc_start_main
#31 0x55efada7f1ea <unknown>

[18779:18779:0724/145920.599254:ERROR:shared_memory_posix.cc(283)] Creating shared memory in /dev/shm/.org.chromium.Chromium.o4usDA failed: Permission denied
[18779:19052:0724/145920.680498:ERROR:zygote_host_impl_linux.cc(277)] Failed to adjust OOM score of renderer with pid 19062: Permission denied
[18779:19054:0724/145922.070590:ERROR:shared_memory_posix.cc(283)] Creating shared memory in /dev/shm/.org.chromium.Chromium.aPAPus failed: Permission denied
[19062:19062:0724/145922.070667:ERROR:broker_posix.cc(44)] Received unexpected number of handles
[18779:19054:0724/145922.071202:ERROR:shared_memory_posix.cc(283)] Creating shared memory in /dev/shm/.org.chromium.Chromium.epIjmk failed: Permission denied
[19062:19062:0724/145922.071266:ERROR:broker_posix.cc(44)] Received unexpected number of handles
[18779:19054:0724/145922.071501:ERROR:shared_memory_posix.cc(283)] Creating shared memory in /dev/shm/.org.chromium.Chromium.kn2Qdc failed: Permission denied
[19062:19062:0724/145922.071552:ERROR:broker_posix.cc(44)] Received unexpected number of handles
[18779:19054:0724/145922.071743:ERROR:shared_memory_posix.cc(283)] Creating shared memory in /dev/shm/.org.chromium.Chromium.Z64q53 failed: Permission denied
[19062:19062:0724/145922.071783:ERROR:broker_posix.cc(44)] Received unexpected number of handles

All these issues disappear (except for the first two quite harmless ones) when I install the snap in devmode, which IMHO means that this is the restriction put on ...

Read more...

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.