appium / appium-inspector

A GUI inspector for mobile apps and more, powered by a (separately installed) Appium server
https://appium.github.io/appium-inspector/
Other
1.11k stars 282 forks source link

Bug: AppImage Linux Ubuntu 24.04 LTS dosn't work #1567

Closed kpietrzyk closed 1 month ago

kpietrzyk commented 1 month ago

Is this an issue specifically with Appium Inspector?

Is there an existing issue for this?

Current Behavior

after downloading and changing chmod of appimage i get this error:

[19889:0723/183728.430148: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_Appium5UZNUQ/chrome-sandbox is owned by root and has mode 4755.

There is no chrome-sandbox in that location so there is no way to change it's owner.

Same error after extracting tar files and changing chrome-sandbox ownership and mode.

Expected Behavior

Run Appium Inspector from command line AppImage

Operating System

Linux

Appium Inspector Version

2024.6.1

Appium Version

2.11.2

Further Information

[19889:0723/183728.430148: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_Appium5UZNUQ/chrome-sandbox is owned by root and has mode 4755.

./appium-inspector --no-sandbox returns that: Screenshot from 2024-07-23 18-57-20

eglitise commented 1 month ago

I'm afraid we don't really have a Linux machine to test this ourselves, but I do have a few suggestions:

mykola-mokhnach commented 1 month ago

https://authmane512.medium.com/solve-the-suid-sandbox-helper-binary-was-found-but-is-not-configured-correctly-3-solutions-4f1425a9a76c

Samueru-sama commented 1 month ago

This is because Ubuntu restricted access to userns with apparmor

Linux mint rolled back that change

While solus dropped apparmor and snap support

kpietrzyk commented 1 month ago

Nice. Right after the fresh install, they made this kind of change :D Thank you for your support

I'm afraid we don't have a Linux machine to test this ourselves, but I do have a few suggestions:

* Are you using the version that matches your computer architecture? (x64 or arm64)

* Does this error still appear on previous app versions? Note that if you're using arm64, support was only added in version 2024.3.4.
  1. Yes. I'm running x64 app on AMD Ryzen 5 3600X CPU
  2. Yes. I tried to run previous version and the problem still occurred.
Samueru-sama commented 1 month ago

btw just in case there is no solution, if --no-sandbox doesn't work you will have to disable the restriction that ubuntu put in place.

sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
eglitise commented 1 month ago

Thanks for the info @Samueru-sama! Closing this issue as it appears to affect all Electron apps and is not specific to the Inspector. Refer to https://github.com/electron/electron/issues/41066 for more details.