Having problems snapping a program that depends on libwebkit2gtk-4.0-dev

Greetings all.

I tried snapping my program which depends on libwebkit2gtk-4.0-dev and it gave me some errors.

Here is my snapcraft file:

name: paelito # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '2.1.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: A book reader that tells if the book has been updated. # 79 char long summary
description: |
  Paelito is a book reader that tells if the book has been updated.

  It's source files are written in markdown.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

  - build-on: amd64

    # See 'snapcraft plugins'
    plugin: go
    source: .
      - libwebkit2gtk-4.0-dev
    override-build: |
      set -xe
      go mod download
      go build -o $SNAPCRAFT_PART_INSTALL/bin/maker ./maker
      go build -o $SNAPCRAFT_PART_INSTALL/bin/paelito ./paelito

    command: bin/maker

    command: bin/paelito
    extensions: [gnome-3-38]
    - network
    - network-bind

After building, installation and running on my system it gives the following errors


Did you try snappy-debug ? It’s a tool that analyses snap-related errors and, if possible, suggests corrections to the package. I believe you’re missing some plugs, and snappy-debug will probably tell you which ones.

$ snap install snappy-debug
$ snappy-debug -r

Then, start your app and see the output.

After following your instructions with snappy-debug, it suggested that I include ‘process-control’ and ‘upower-observe’.

I did both, rebuild, refresh and still the problem persists.

So, try a step back. Change the confinement to devmode; it’ll effectively make the Snap run as if unconfined, but errors and otherwise blocked resources will be logged. See this. Run your package on a terminal, and take a look at the output.

Thanks for your attempts but still not working.

Here is my terminal output after following your instructions:

Please help.