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

Chrome and Chromium won't launch #205

Open
ghost opened this issue Sep 15, 2020 · 11 comments
Open

Chrome and Chromium won't launch #205

ghost opened this issue Sep 15, 2020 · 11 comments

Comments

@ghost
Copy link

ghost commented Sep 15, 2020

Describe the bug
Both Chrome and Chromium will not launch. If i run it with --no-sandbox, it will launch but will cause instability like crashes, EGL errors, no such file or directory etc...

To Reproduce
Steps to reproduce the behavior:

  1. Open Start menu -> Internet
  2. Launch Chromium Web Browser or Google Chrome (if installed)

Expected behavior
To launch normally without extra arguments

Screenshots
image

Versions (please complete the following information):

  • OS: Ubuntu 18.04
  • image tag: ubuntu-desktop-lxde-vnc-1

Additional context
Nothing

@fcwu
Copy link
Owner

fcwu commented Sep 27, 2020

Is chromium-browser --no-sandbox work?

@chaggeus
Copy link

chaggeus commented Oct 14, 2020

Chrome work ok with this kind of docker startup definition.
Important things are:

  1. user have to be some other than root (then --no-sandbox parameter with chrome is not needed)
  2. cap_add: SYSADMIN is required, check: Chrome - Failed to move to new namespace. jessfraz/dockerfiles#65
$ cat docker-compose.yaml
version: '2'
services:
  novnc:
    image: dorowu/ubuntu-desktop-lxde-vnc:focal
    hostname: noVNClinux
    cap_add:
      #Google Chrome require this: https://github.com/jessfraz/dockerfiles/issues/65
      - SYS_ADMIN
    ports:
      - '80:80'
    environment:
      - USER=ubuntu

Looks like chromium installation require snap in ubuntu and execution of it in container is challenging. So I did't test it.
Anyway @fcwu you can close this ticket with this answer.

@saptarsi96
Copy link

With a non-root user, chrome fails after some time with "SIGILL error"
Screenshot from 2021-02-21 15-18-49

@chaggeus
Copy link

chaggeus commented Feb 21, 2021 via email

@saptarsi96
Copy link

@chaggeus 'The Compose file './docker-compose.yaml' is invalid because:
Unsupported config option for services.novnc-with-robotframework: 'cpu_count''
Getting this error using your repo!

@chaggeus
Copy link

chaggeus commented Feb 21, 2021

Update your docker-compose to latest version.

Docker-compose 2.2 include it
https://docs.docker.com/compose/compose-file/compose-file-v2/

@saptarsi96
Copy link

Issue not resolved! My memory is pretty high 16GB RAM. Don't know why this is happening.

@saptarsi96
Copy link

Any better ubuntu desktops with GUI dockerized containers out there? I came across this article: https://dev.to/brickpop/my-dream-come-true-launching-gui-docker-sessions-with-dx11-in-seconds-1a53. Can you figure this out? @fcwu This seems to solve a lot of inherent problems.

@fcwu
Copy link
Owner

fcwu commented Feb 21, 2021

Have you used -v /dev/shm:/dev/shm in your docker command?

@chaggeus
Copy link

I get similar chrome crash on in noVNC platform.
Chrome error code was different: "Error code: 64000"

@chaggeus
Copy link

chaggeus commented Feb 22, 2021

Have you used -v /dev/shm:/dev/shm in your docker command?

At least to me that work. I added it also to here as docker-compose parameter "shm_size: 1G" (default value was 64M) : https://github.com/TheProjectAurora/novnc-robotframework-docker/blob/master/docker-compose.yaml
....find similar situation from https://developers.google.com/web/tools/puppeteer/troubleshooting#tips

It is interesting monitor /dev/shm usage inside of noVNC by executing 'watch -n 1 "df -h /dev/shm/"' in LXTerminal parallel when you browsing internet with chrome. Quick test it eat more than 200M space from /dev/shm.

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

3 participants