8000 unable to launch when installed from .deb in Ubuntu 24.04 · Issue #1102 · frappe/books · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

unable to launch when installed from .deb in Ubuntu 24.04 #1102

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

Open
smcoll opened this issue Jan 27, 2025 · 6 comments
Open

unable to launch when installed from .deb in Ubuntu 24.04 #1102

smcoll opened this issue Jan 27, 2025 · 6 comments

Comments

@smcoll
Copy link
smcoll commented Jan 27, 2025

i was running version 0.20.0 from a .deb in Ubuntu 22.04, but now i can't run it in Ubuntu 24.04.

$ frappe-books 
LaunchProcess: failed to execvp:
/opt/Frappe
Trace/breakpoint trap (core dumped)

i also tried the 0.24.0 and 0.26.1 debs and got the same result.

@smcoll
Copy link
Author
smcoll commented Jan 28, 2025

i just noticed that there is no /opt/Frappe on my system - there is an /opt/Frappe Books. Could this be related to a space in the path?

@smcoll
Copy link
Author
smcoll commented Jan 28, 2025

OK, made a discovery. i tried running from yarn instead, and saw this output:

$ yarn dev
running Frappe Books in dev mode
root: /home/me/books
[28345:0128/131405.066574:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/me/books/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.
/home/me/books/node_modules/electron/dist/electron exited with signal SIGTRAP

Here's what permissions/ownership for that file looks like:

$ ls -al /home/me/books/node_modules/electron/dist/chrome-sandbox 
-rwxr-xr-x 1 me me 52808 Jan 28 12:51 /home/me/books/node_modules/electron/dist/chrome-sandbox

Then i found this comment, which says:

The issue is with the AppArmor configuration in Ubuntu 24.04, not the AppImage. The change in the configuration is explained in the release notes of Ubuntu 24.04 (security reasons).

Because this problem is caused by the OS configuration, I'm not use what the Arduino IDE team can do, except for documenting the installation procedure.

You can disable the sandboxing restriction for all program with:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=1

or by adding to /etc/sysctl.d/local.conf:

kernel.apparmor_restrict_unprivileged_userns=0

But that defeats the purpose of the new AppArmor restriction in Ubuntu 24.04.

The comment goes on to show how to apply this exception to a single application

So i tried disabling the sandboxing restriction, and now the binary launches:

$ frappe-books 
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
[34414:0128/133709.983686:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!

Fwiw, i can also launch from yarn now, but the window didn't render.

$ yarn dev
running Frappe Books in dev mode
root: /home/me/work/internal/projects/books
Debugger listening on ws://127.0.0.1:5858/5509f194-bf98-4465-9e4e-9407a9a522fb
For help, see: https://nodejs.org/en/docs/inspector

  VITE v4.5.5  ready in 784 ms

  ➜  Local:   http://127.0.0.1:6969/
  ➜  press h to show help

[...]

Related threads:

@smcoll
Copy link
Author
smcoll commented Jan 28, 2025

This is what i have done for the time being:

  1. Downloaded the AppImage, made it executable, and moved/renamed it to /usr/local/bin/frappe-books
  2. added a /etc/apparmor.d/frappe-books file with these contents:
    abi <abi/4.0>,
    include <tunables/global>
    
    profile frappe-books /usr/local/bin/frappe-books flags=(unconfined) {
      userns,
    
      # site-specific additions and overrides. 
      include if exists <local/frappe-books>
    }
    
  3. sudo service apparmor reload && frappe-books to load the profile and make sure it runs
  4. made a desktop launcher at ~/.local/share/applications/frappe-books.desktop (i should have found the one the .deb installed):
    [Desktop Entry]
    Name=Frappe Books
    Comment=Bookkeeping
    Exec=/usr/local/bin/frappe-books
    Icon=/usr/local/bin/frappe-books.png
    Terminal=false
    Type=Application
    Categories=Office;
    
  5. i think that has to be made executable
  6. copied https://github.com/frappe/books/tree/master/build/icon.png to /usr/local/bin/frappe-books.png

Now i can launch it.

@Moniaar
Copy link
Moniaar commented Mar 10, 2025

I am sorry but I have been stuck in same problem for 3 days now and I have a question as I am facing same error as yours: What do you mean by AppImage? I did read the issue you referred us to but still didn't get how you applied it. The issue you used as a reference had the AppImage in their path, but our problem isn't in same path..??
I get this error:

root@Monia:/books# yarn dev
yarn run v1.22.22
$ node build/scripts/dev.mjs
running Frappe Books in dev mode
root: /books
$ /books/node_modules/.bin/vite

  VITE v4.5.9  ready in 306 ms

  ➜  Local:   http://127.0.0.1:6969/
  ➜  press h to show help
[0310/160008.025955:FATAL:electron_main_delegate.cc(293)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/books/node_modules/electron/dist/electron exited with signal SIGTRAP
Done in 1.66s

@smcoll
Copy link
Author
smcoll commented Mar 13, 2025

@Moniaar each Frappe Books version has an AppImage file which can be downloaded from the Releases page.

If you are following the instructions at #1102 (comment), you don't need to build with yarn.

@Moniaar
Copy link
Moniaar commented Apr 1, 2025

@smcoll thank you! I was able to run it on my ubuntu after adding this script in my package.json file and used npm start to view and npm start dist to build:

  "scripts": {
    "start": "ELECTRON_ENABLE_LOGGING=0 electron --no-sandbox .",
    "dist": "electron-builder"

and as you said I didn't need yarn at all :)!.

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

No branches or pull requests

2 participants
0