hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Crashes on Ubuntu 24.04 due to permissions on /opt/Hyper/chrome-sandbox

Open laidbackware opened this issue 1 year ago • 7 comments

  • Ubuntu 24.04
  • 3.4.1 and 4.0.0 canary 5 from deb
  • https://gist.github.com/laidbackware/b4cefe9b20a1ef4cccea5a0cc1b82d71
  • N/A
  • **Open **

Issue

After upgrading from from Ubuntu 23.10 to 24.04 Hyper 3.4.1 started crashing on open with SIGTRAP in dlsym_doit(). I upgraded to 4.0.0 canary 5 and still the same problem.

Running in verbose mode from another terminal results a file permissions error, but .

➜ hyper -v
[28388:0428/111718.055728: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 /opt/Hyper/chrome-sandbox is owned by root and has mode 4755.

~/Downloads 
➜ ll /opt/Hyper/chrome-sandbox
-rwxr-xr-x 1 root root 52808 Jul 13  2023 /opt/Hyper/chrome-sandbox

This can be fixed by running the following chmod command to enable the setuid bit, which changes the user executable mode to s.

➜ sudo chmod 4755 /opt/Hyper/chrome-sandbox

➜ ll /opt/Hyper/chrome-sandbox
-rwsr-xr-x 1 root root 52536 Jan  7  2023 /opt/Hyper/chrome-sandbox

Removing and re-installing or upgrading the deb sets the permissions back to default which results in crashing again.

I'm not sure whether it's related, but sudo apt install ./<file>.deb generates the following error.

N: Download is performed unsandboxed as root, as file '/home/matt/Downloads/hyper_3.4.1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Issue also impacts the appimage.

➜ ./Hyper-4.0.0-canary.5-x86_64.AppImage 
[32189:0428/115238.921357: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 /tmp/.mount_Hyper-D928zV/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)

laidbackware avatar Apr 28 '24 10:04 laidbackware

It looks like this issue in electron-builder. In the resolution it says to run the build on Debian 11+. I find it strange that you would need to run the build at a newer OS version just to set file permissions. Actions ubuntu-latest is still 22.04 at the time of writing.

laidbackware avatar Apr 28 '24 10:04 laidbackware

same question here. The ubuntu LTS 24.04 is release now, and the hyper cannot work.

vzhilong avatar Apr 30 '24 14:04 vzhilong

I have the same problem.

ayanamists avatar May 05 '24 05:05 ayanamists

Quick workaround is:

sudo chmod 4755 /opt/Hyper/chrome-sandbox

but it works until new update or something is made.

abixadamj avatar May 15 '24 19:05 abixadamj

Quick workaround is:

sudo chmod 4755 /opt/Hyper/chrome-sandbox

but it works until new update or something is made.

@abixadamj this workaround is in the original description and it only works for installations, not for the appimage.

laidbackware avatar May 15 '24 19:05 laidbackware

Yes, but I prefer deb files rather than AppImages, so didnt notice...

abixadamj avatar May 15 '24 19:05 abixadamj

Quick workaround is:

sudo chmod 4755 /opt/Hyper/chrome-sandbox

but it works until new update or something is made.

@abixadamj this workaround is in the original description and it only works for installations, not for the appimage.

This problem may relates to a bug in electron, and they give a temporary solution. I also use Ubuntu 24.04, and this solution works in my machine.

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

ayanamists avatar Jun 25 '24 11:06 ayanamists