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

Page Unresponsive and Failed to open file: /run/rosetta/rosetta in Headed Chromium using Docker Desktop on Apple Silicon Mac #7552

Open
2-X opened this issue Jan 16, 2025 · 0 comments

Comments

@2-X
Copy link

2-X commented Jan 16, 2025

Description

I have a setup that is using a headed version of chromium to load pages in the web in a docker image. It works well in lambda and on my coworker's intel macbook from 2019, but locally on my M2 Max laptop I cannot get around this one issue.

On some sites like verizon.com, I am able to load the main page content and scroll the page but certain parts of the page (perhaps they are javascript-derived) to not run. Eventually after trying to load for a while it says pops up the error "Page Unresponsive". This prevents me from being able to use any of the sites that I am loading.

However, I am able to load youtube fine and watch youtube videos through the connected VNC viewer, so javascript must work in some capacity. Also I tried disabling the VNC viewer and it still has the same issue.

I am using the Apple Virtualization framework on an M2 Max with Use Rosetta for x86_64/amd64 emulation on Apple Silicon checked. I have tried turning off the rosetta or using the Docker VMM and it significantly slows down the runtime execution to where it's unusable so that is not an option.

I encounter the following errors when running my script, and I feel like the rosetta one is a good culprit but can't figure out how to fix it:

[CHROME STDERR] [0116/194756.489018:WARNING:stack_trace_posix.cc(919)] Failed to open file: /run/rosetta/rosetta
[CHROME STDERR] Error: Success
[CHROME STDERR] [76:92:0116/194756.699018:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[CHROME STDERR] [76:92:0116/194756.999423:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[CHROME STDERR] [76:76:0116/194757.151270:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[CHROME STDERR] [116:116:0116/194757.401384:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[CHROME STDERR] [76:76:0116/194758.109133:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[CHROME STDERR] [159:175:0116/194758.963309:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

logs from my coworker's successful run on his intel mac, for comparison:

[CHROME STDERR] [67:86:0116/195543.092991:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[CHROME STDERR] [67:86:0116/195543.407039:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[CHROME STDERR] [67:67:0116/195543.541989:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(161) Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[CHROME STDERR] [113:113:0116/195543.941250:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[CHROME STDERR] [67:67:0116/195544.214071:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:
[CHROME STDERR] [154:169:0116/195545.035036:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

I am using chrome version 123 (revision 1262506) as it seems to be the most stable in a lambda env. Other versions such as revision 1097615 and 1135561 have the same exact issue.

I am running chrome with the flags

 f'--window-size={display_width},{display_height}',
"--start-maximized",
'--no-sandbox',
'--disable-dev-shm-usage',

i am not using the following flags as they cause issues with initial page loads:

            # "--disable-gpu",    # BIG ISSUE LOCALLY
            # "--single-process", # BIG ISSUE LOCALLY

I've tried every combination of flags I can think of. Can't find anyone else with the same issue online. Any and all help would be greatly appreciated.

Build & Run script:

echo "Building fresh image..."
docker build -t medusa "$LAMBDA_DIR" --platform=linux/amd64 -f "$LAMBDA_DIR/Dockerfile.local"

# Run with additional performance parameters
echo "Starting container..."
docker run --platform=linux/amd64 \
    --memory=8g \
    --shm-size=2g \
    --cpus=4 \
    -p 5900:5900 \
    -p 9000:8080 \
    --cap-add=SYS_ADMIN \
    --security-opt seccomp=unconfined \
    medusa
Image

Reproduce

  1. build a docker image with headed chromium, routing through x11
  2. run my docker image
  3. docker image auto-loads chrome
  4. manually visit verizon.com
  5. watch the issue happen every time

Expected behavior

It should load the pages fine, without "Page Unresponsive" ever appearing.

docker version

Client:
 Version:           27.4.0
 API version:       1.47
 Go version:        go1.22.10
 Git commit:        bde2b89
 Built:             Sat Dec  7 10:35:43 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.37.2 (179585)
 Engine:
  Version:          27.4.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.10
  Git commit:       92a8393
  Built:            Sat Dec  7 10:38:33 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.21
  GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    27.4.0
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  ai: Ask Gordon - Docker Agent (Docker Inc.)
    Version:  v0.5.1
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-ai
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.19.2-desktop.1
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.31.0-desktop.2
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.37
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Beta) (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.15.1
    Path:     /Users/kbrethower/.docker/cli-plugins/docker-scout

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 27.4.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.14-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 12
 Total Memory: 23.68GiB
 Name: docker-desktop
 ID: 94d75a74-8ac4-45a7-82e6-59227bd1b614
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///Users/kbrethower/Library/Containers/com.docker.docker/Data/docker-cli.sock
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile

Diagnostics ID

6B598F01-B7A3-4CAD-89DF-E913C8018CC5/20250116195929

Additional Info

No response

@2-X 2-X changed the title Headed Chromium in Docker Desktop for Mac gets "Page Responsive" on some pages "Page Responsive" in Headed Chromium in Docker Desktop for Apple Silicon Mac Jan 16, 2025
@2-X 2-X changed the title "Page Responsive" in Headed Chromium in Docker Desktop for Apple Silicon Mac "Page Responsive" in Headed Chromium in Docker Desktop on Apple Silicon Mac Jan 16, 2025
@2-X 2-X changed the title "Page Responsive" in Headed Chromium in Docker Desktop on Apple Silicon Mac "Page Responsive" in Headed Chromium using Docker Desktop on Apple Silicon Mac Jan 16, 2025
@2-X 2-X changed the title "Page Responsive" in Headed Chromium using Docker Desktop on Apple Silicon Mac "Page Unresponsive" in Headed Chromium using Docker Desktop on Apple Silicon Mac Jan 16, 2025
@2-X 2-X changed the title "Page Unresponsive" in Headed Chromium using Docker Desktop on Apple Silicon Mac Page Unresponsive and Failed to open file: /run/rosetta/rosetta in Headed Chromium using Docker Desktop on Apple Silicon Mac Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant