cursor icon indicating copy to clipboard operation
cursor copied to clipboard

Cursor 0.33.4 refuses to start on Kubuntu 24.04: "SUID sandbox helper binary was found, but is not configured correctly"

Open meladoro opened this issue 1 year ago • 24 comments

  1. If you can, please include a screenshot of your problem

Here it is, though it hardly makes sense in this case:

Screenshot_20240522_171426

  1. Please include the name of your operating system

As reported by lsb_release -a:

Distributor ID: Ubuntu Description: Ubuntu 24.04 LTS Release: 24.04 Codename: noble

Flavor is Kubuntu, though.

  1. If you can, steps to reproduce are super helpful
  • Download latest version of Cursor from cursor.sh, cursor-0.33.4x86_64.AppImage
  • Run chmod u+x ./cursor-0.33.4x86_64.AppImage
  • Run ./cursor-0.33.4x86_64.AppImage
  • Cursor refuses to start with following error: [3940:0523/104843.586137:FATAL:setuid_sandbox_host.cc(158)] 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_cursorl2LAz7/chrome-sandbox is owned by root and has mode 4755. Trace/breakpoint trap (core dumped)

I appreciate any assistance. Thank you very much.

m.

meladoro avatar May 23 '24 17:05 meladoro

I have the same issue. The only thing that worked for me was running the app image using the flag: --no-sandbox

I searched a lot for a solution to run it without the no-sandbox flag ... but found nothing useful yet.

I hope someone finds a better solution than the no-sandbox flag.

mostafa20220 avatar May 27 '24 03:05 mostafa20220

Same here.

Octahedron-Alum avatar Jun 22 '24 02:06 Octahedron-Alum

Having this issue too.

rehypothecation avatar Jun 23 '24 15:06 rehypothecation

This happens after Ubuntu 24.04

To resolve this issue, cursor developers need to add an apparmor profile like this https://github.com/mullvad/mullvadvpn-app/pull/6196

0xlidar avatar Jul 08 '24 09:07 0xlidar

Same issue with me Ubuntu 24.04

dushmanta05 avatar Aug 25 '24 12:08 dushmanta05

I have the same sandbox issue on Ubuntu 24.04 and if I run with "--no-sandbox" the UI starts up but I get SQL Lite errors and some others. Has anyone solved these problems and can share step by step instructions? Given all the hype about Cursor I'm kind of surprised, Ubuntu is not exactly a niche operating system.

helgster77 avatar Aug 27 '24 18:08 helgster77

@helgster77 I've exactly same issue on my Ubuntu 24.04

dushmanta05 avatar Aug 28 '24 02:08 dushmanta05

Same here

Imobacho avatar Sep 02 '24 05:09 Imobacho

Same with Ubuntu 24.04. I am able to run it a bit with --no-sandbox, but it crashes randomly.

jurjendevries avatar Sep 06 '24 14:09 jurjendevries

Same here with ubuntu 24.04

Buckler89 avatar Sep 09 '24 18:09 Buckler89

I just updated from 22.04 to 24.04 and get the same error. As far as I can see there are at least a few issues regarding this - this one, #1483 and #1683

nettum avatar Sep 10 '24 19:09 nettum

FWIW, as far as I can see vscode runs with the --no-sandbox flag, at least when you download the snap. See diff between old and fixed version and a later a commit to change where --no-sandbox is defined

Edit:

I also tried to add my own AppArmor file, which I guess is a more secure fix. This needs to fixed by the authors of cursor for a permanent fix, but for the record I did the following: Add a cursor-profile to /etc/apparmor.d:

# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

abi <abi/4.0>,
include <tunables/global>

profile cursor <your-path-to-cursor>/cursor*.AppImage flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/cursor>
}

You need to change <your-path-to-cursor> and <version-flags>

Reload AppArmor service with sudo systemctl reload apparmor.service and check if everything is ok with sudo systemctl status apparmor.service. You should now be able to run cursor without using --no-sandbox. I have not tested cursor much after this change, so I don't know if there are any bugs or if the apparmor profile would need more adjustments.

Edit 2: Seems like @arpagon already suggested a similar fix in another issue

Edit 3: Edited apparmor code to use cursor*.AppImage (same as the example linked to above) instead of cursor-<version-flags>.AppImage as the latter will not work after AppImage updates.

nettum avatar Sep 11 '24 08:09 nettum

Same here with ubuntu 24.04

Ubuntu 24.04.1. Same from CLI, but does start from GUI

luisriverag avatar Sep 11 '24 11:09 luisriverag

It is caused by messed up pemissions in AppImage, my workaround is https://github.com/getcursor/cursor/issues/1907

Livia-Zaharia avatar Sep 16 '24 13:09 Livia-Zaharia

FYI closed a few duplicate issue reports, however a potential workaround not needing any AppArmour work was posted in #1907 if anyone with this issue wants to try that.

danperks avatar Sep 18 '24 13:09 danperks

Can developers just fix it or at least give a link to workaround (like the one @Livia-Zaharia did in #1907 )? The problem is obvious: messed up AppImage release process when wrong permissions are given to part of the image. Having things broken for a huge part of users is not lovely. I am surprised that the issues persist for multiple months.

antonkulaga avatar Sep 18 '24 13:09 antonkulaga

FWIW easiest workaround is to run https://github.com/probonopd/go-appimage that'll auto create .desktop launchers that Just Work (as in, copy the appimage into ~/Applications, like on Mac). I personally only needed the app armour config to ensure I could still start Cursor from the command line (and no longer do).

No sorry, I didn't look into why the generated launchers work but starting it from the console fails.

lypanov avatar Sep 18 '24 17:09 lypanov

@lypanov Would be great if you can provide detailed information about how you use go-appimage to make Cursor run. There are a few different tools in that repo.

helgster77 avatar Sep 19 '24 09:09 helgster77

I solved this with this work-around:

https://github.com/getcursor/cursor/issues/1683#issuecomment-2368366251

martinkrung avatar Sep 23 '24 14:09 martinkrung

Lots of temporary fixes here now. Problem is that all of them are workarounds and needs work done by the end-user. Some of the solutions also need to be re-done when cursor updates or user do manual update. Not a good first impression for new users that want to try the product.
Hope the team will look into this as it's been broken for a very popular linux distro for some time now.
I'm currently on the fence on cursor/upgrading plan. Need to get a feeling if linux is prioritized or not. Apart from this hiccup, very satisfied with cursor so far! :tada:

nettum avatar Sep 23 '24 14:09 nettum

To simplify and automate the process of managing app updates, I've created an interactive Bash script. This script enhances the user experience by allowing dynamic selection of specific tasks related to the Cursor app management.

Options

You can select:

  • Option (1): Search for and download the latest version if a newer one is available than what's currently on your machine.
  • Option (2): Re/install the latest version already downloaded to your machine and create a symbolic link to the executable with an icon.
  • Option (3): Configure AppArmor for the safe execution of the newly installed or updated version.

For more details, view the code and its explanation in my gist:

cursor_appimage_manager.sh

I hope this can help someone.

Good luck!

jorcelinojunior avatar Sep 25 '24 15:09 jorcelinojunior

@lypanov Would be great if you can provide detailed information about how you use go-appimage to make Cursor run. There are a few different tools in that repo.

Sorry I meant https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md specifically.

With this installed on my system Cursor has always "Just Worked" (with the exception as mentioned earlier that you can't start it from the commandline).

To get even more concrete: I copy appimages to ~/Applications just like on a Mac. appimaged notices any such images and automatically "installs" the applications such that they end up my Ubuntu "Dock". I haven't dug into the why alas and am unlikely to have time any time soon.

lypanov avatar Sep 25 '24 15:09 lypanov

I searched this solution, i worked for me: Ubuntu 24.04 implemented new restrictions for AppImage apps, which restricts the use of sandboxes. run this command to deactive restriction:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

https://github.com/electron/electron/issues/42510

dangviethung096 avatar Sep 28 '24 11:09 dangviethung096

Given all the hype about Cursor I'm kind of surprised, Ubuntu is not exactly a niche operating system.

Ran into the same issue and was like "Seriously?". Hope it gets fixed soon, really want to give Cursor a proper shot.

timoklein avatar Oct 03 '24 06:10 timoklein

updated to ubuntu 24.04 LTS from 22.04, and found my way here after trying to use cursor. removing the sandbox restriction in 24.04 seems to work. Is that really a recommended solution?

dalklein avatar Oct 16 '24 18:10 dalklein

Will flag this, seems like some changes to how Cursor is built will be needed to support this.

danperks avatar Oct 17 '24 14:10 danperks

My company purchased multiple sets for Cursor sub., but your product can't even run under a fresh install major Linux distro, this is unacceptable.

Cursor is not a game or office software, it's an IDE, you guys needs to realize there are Linux users, in fact a lot. The issue prisits for MONTHS, telling us won't fix try workarounds, is not a good impression for a commercial product.

Using an AI based product to save time and effort, but if we have to waste all that saved resources on figuring out how to get it running, then what's the point?

424778940z avatar Oct 23 '24 21:10 424778940z

Honestly it's not a great experience to download a broken appimage. Why not have a downloads page where you can write under the Linux download that you can't use Cursor on modern linux distros yet. That way we know ahead of time until you fix it.

The uni-download button is not great imo. What if I was looking for an exe but I'm running nix?

ihatecsv avatar Nov 13 '24 14:11 ihatecsv

@arvid220u @shaoruu - this needs to be fixed urgently. At minimum issue a statement on your website.

simonjanin avatar Nov 26 '24 14:11 simonjanin

People got 65 mln of funding but cannot fix a bug that makes their system unusable for half a year and for which fixes were provided in the issues already ( @Livia-Zaharia gave a fix in one of her comments in September!). Very disgraceful

antonkulaga avatar Dec 13 '24 00:12 antonkulaga