Skip to content
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

bak-rest-drone crashes for non-root user #2

Closed
tobiasdam opened this issue Mar 21, 2024 · 1 comment
Closed

bak-rest-drone crashes for non-root user #2

tobiasdam opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@tobiasdam
Copy link
Contributor

When running the container with non-root user Selenium crashes with following exception:

   raise exception_class(message, screen, stacktrace)\n'
              'selenium.common.exceptions.SessionNotCreatedException: Message: '
              'session not created: Chrome failed to start: exited normally.\n'
              "  (session not created: DevToolsActivePort file doesn't exist)\n"
              '  (The process started from chrome location '
              '/usr/bin/chromium-browser is no longer running, so ChromeDriver '
              'is assuming that Chrome has crashed.)\n'

starting chromium inside the container with chromium --headless=new --no-sandbox resulted in:

chrome_crashpad_handler: --database is required
Try 'chrome_crashpad_handler --help' for more information.

strace -c -f chromium --headless=new --no-sandbox showed:

[0531/142448.613680:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)

This happened on a linux host - the same image and configuration worked fined on wsl2

@tobiasdam
Copy link
Contributor Author

After searching and trying various things I found this

Apparently chromium cannot create the default directories for the following variables and setting them to a writable directory fixes the issues:

- name: XDG_CONFIG_HOME
  value: /tmp/.chromium
- name: XDG_CACHE_HOME
  value: /tmp/.chromium

I don't really know why the previous config worked on WSL2, but I guess some kernel differences lead to chromium doing things a different way.

(I found that WSL2 has no user namespaces(see this) and no /proc/sys/kernel/yama/ptrace_scope)

@tobiasdam tobiasdam added the bug Something isn't working label Mar 21, 2024
tobiasdam added a commit that referenced this issue Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant