Need Some Help For Snapping Calibre

I am trying to snap calibre, the snap is build but wont run in the prescribed way with producing the following error ;

Traceback (most recent call last):
  File "", line 196, in _run_module_as_main
  File "", line 86, in _run_code
  File "", line 47, in <module>
  File "", line 43, in main
  File "calibre/", line 73, in calibre
  File "calibre/gui2/", line 553, in main
  File "calibre/utils/", line 196, in __enter__
  File "calibre/utils/", line 148, in create_single_instance_mutex
  File "calibre/utils/ipc/", line 24, in eintr_retry_call
PermissionError: [Errno 13] Permission denied

Running the snap by violating the sandbox (/snap/calibre/12/opt/calibre) works fine, so if anyone could give me some insight on what am doing wrong or can improve will be great.

Here is the YAML ;

Edit: I think this has something to do with lockfiles ??

Have you seen this thread ?

(There are some prior attempts that you could perhaps steal from, but you also might run into some reluctance from upstream )

Man what a coincidence, i was just reading this, their is a comment about network socket error, is there any plug that can resolve it ??

Actual network sockets are covered by network-bind … but the one in the error looks more like a Unix domain socket…

Hmm, in my personal opinion the main error is that calibre_postinstall isnt being executed properly as it says it created symlinks for usr/bin/calibre but usr/bin/calibre doesnt exist plus the desktop file that is generated after its execution is missing

The error mentioned by earlier enthusiasts maybe similar what we get currently is also permission error No 13 but error 13 is usually associated with access not being given, and again i think the manual binaries arent sitting right in the snap build env ?? , i think we will have to somehow force it to fit in the env, i saw the flatpak src file, they have done a lot hibbie-jibbies for getting it run

Snappy-debug output/suggestion ;

= AppArmor =
Time: Jun  2 09:55:35
Log: apparmor="DENIED" operation="bind" class="net" profile="snap.calibre.calibre" pid=5643 comm="calibre" family="unix" sock_type="stream" protocol=0 requested_mask="bind" denied_mask="bind" addr="@calibre-singleinstance-1000-GUI"
* adjust '@calibre-singleinstance-1000-GUI' to start with 'snap.calibre.' (eg, '@snap.calibre.calibre-singleinstance-1000-GUI')
* use 'listen-stream: @snap.calibre.calibre-singleinstance-1000-GUI' for a socket-activated daemon