From 92a6a5078e54b3dacd92c19c5e517a799d381824 Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Mon, 29 May 2023 08:44:19 +0800 Subject: [PATCH] fix the outdated docker chrome bin path --- lib/docker/Dockerfile | 2 +- lib/launcher/private_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docker/Dockerfile b/lib/docker/Dockerfile index 4b22e8c1..f7d580f3 100644 --- a/lib/docker/Dockerfile +++ b/lib/docker/Dockerfile @@ -16,7 +16,7 @@ RUN go run ./lib/utils/get-browser FROM ubuntu:jammy COPY --from=go /root/.cache/rod /root/.cache/rod -RUN ln -s /root/.cache/rod/browser/$(ls /root/.cache/rod/browser)/chrome-linux/chrome /usr/bin/chrome +RUN ln -s /root/.cache/rod/browser/$(ls /root/.cache/rod/browser)/chrome /usr/bin/chrome RUN touch /.dockerenv diff --git a/lib/launcher/private_test.go b/lib/launcher/private_test.go index ebaae0f2..6c2d693f 100644 --- a/lib/launcher/private_test.go +++ b/lib/launcher/private_test.go @@ -148,8 +148,8 @@ func TestURLParserErr(t *testing.T) { g.Eq(u.Err().Error(), "[launcher] Failed to get the debug url: error") - u.Buffer = "/tmp/rod/chromium-818858/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory" - g.Eq(u.Err().Error(), "[launcher] Failed to launch the browser, the doc might help https://go-rod.github.io/#/compatibility?id=os: /tmp/rod/chromium-818858/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory") + u.Buffer = "/tmp/rod/chromium-818858/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory" + g.Eq(u.Err().Error(), "[launcher] Failed to launch the browser, the doc might help https://go-rod.github.io/#/compatibility?id=os: /tmp/rod/chromium-818858/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory") } func TestTestOpen(_ *testing.T) {