Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sgmoore/fix qtwebengineprocess #4745

Merged

Conversation

ScarlettGatelyMoore
Copy link
Contributor

  • [ x] Have you followed the guidelines for contributing?
  • [ x] Have you signed the CLA?
  • [ x] Have you successfully run tox run -m lint?
  • [ x] Have you successfully run tox run -e test-py310? (supported versions: py39, py310, py311, py312)

Tests pass locally.

ScarlettGatelyMoore and others added 30 commits March 21, 2024 09:04
Fix the target for kf6 to point to its own dir kf6.
Fix test accordingly.
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Remove the qt6 platform plug as we bundle the qt6 in the kf6 runtime due
to limited to one platform plug.
Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Co-authored-by: Michał Sawicz <michal@sawicz.net>
Copy link

@tsteven4 tsteven4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to test this if I could install a corresponding snap.

@tsteven4
Copy link

I'd be happy to test this if I could install a corresponding snap.

I installed snapcraft from pull request Spread Tests artifact (https://github.com/canonical/snapcraft/actions/runs/8740342524), and used it to build a snap that used QtWebEngine. It worked properly. thanks.

I did see the following messages with the snap based gpsbabelfe, BUT I ALSO see these when I build directly on jammy with Qt 6.7.0, so these messages are NOT specific to the snap build.

Path override failed for key base::DIR_APP_DICTIONARIES and path '/snap/gpsbabel/x1/usr/bin/qtwebengine_dictionaries'
Path override failed for key base::DIR_APP_DICTIONARIES and path '/snap/gpsbabel/x1/kf6/usr/lib/qt6/libexec/qtwebengine_dictionaries'
Path override failed for key base::DIR_APP_DICTIONARIES and path '/snap/gpsbabel/x1/kf6/usr/lib/qt6/libexec/qtwebengine_dictionaries'
[2460786:2460792:0418/101313.844373:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

@lengau lengau requested review from lengau and mr-cal April 18, 2024 17:23
@tsteven4
Copy link

With the latest snap (from https://github.com/canonical/snapcraft/actions/runs/8740342524) I have verified that translations work. They work because of the layout mapping /usr/share/qt6 -> $SNAP/kf6/usr/share/qt6, .i.e. my snap successfully finds translations via the /usr/share/qt6 path. I have verified no qt.conf is created in ~/snap/gpsbabel/.

The QtWebEngine part of my app works as well.

FYI my snapcraft.yaml file is https://github.com/tsteven4/gpsbabel/blob/5935f437a8a996057a996f7316e614578e92fe20/snap/snapcraft.yaml

👏 👏 👏

Copy link
Contributor

@lengau lengau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! All looks good to me, and ark and kcalc are still building & working as expected

@tsteven4
Copy link

I do have issues running a snapped app with QtWebEngine on Linux if apparmor is enforcing. Chromium is trying to access /dev/shm. I can solve this by adding the shared-mem plug in private mode to my snap. Is the proper place to do this in every apps snapcraft.yaml, or should this be taken care of in kde-neon6?

Log: apparmor="DENIED" operation="mknod" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/dev/shm/.org.chromium.Chromium.YQN0cG" pid=3475 comm="gpsbabelfe" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
File: /dev/shm/.org.chromium.Chromium.YQN0cG (write)

Even with the shared-mem plug there are other apparmor denials, although they don't seem to prevent my app from functioning. Some are:

apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/etc/vulkan/...
apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/var/tmp/"
apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/proc/4491/oom_score_adj"
apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/proc/4301/mounts"
apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/etc/fstab"
apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/hostname1" 
apparmor="DENIED" operation="open" class="file" profile="snap.gpsbabel.gpsbabelfe" name="/run/udev/data/c5:3"

Copy link
Collaborator

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@tsteven4
Copy link

It looks like a better way to handle the apparmor shm denials is to use the browser-support interface instead of the shared-memory interface. Is that something that should be added to kde-neon6? Without one of these QtWebEngine won't work if apparmor is enforcing.

@mr-cal mr-cal enabled auto-merge (squash) April 29, 2024 19:23
@mr-cal mr-cal merged commit 5c0826b into canonical:main Apr 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants