Closed PanisSupraOmnia closed 2 months ago
Is there anything unique in your Homestead setup, because the web driver installation succeeds fine for me.
I don't fully understand what this change is doing. Can you explain a little more what the additional line is supposed to do?
While our setup is customized, I can replicate it with a basic example. Below are the steps I used.
In an empty folder:
composer create-project laravel/laravel example-app
cd example-app && composer require laravel/dusk --dev
On a clean copy of Homestead main (e.g. git checkout main && git checkout . && git clean -xdf
):
bash init.sh
vagrant up
The error occurs during this step: https://github.com/laravel/homestead/blob/5125ef3c5fdb08a18cec5b5644b061d7b823ca29/scripts/features/webdriver.sh#L25-L29
@browner12, are you using an ARM Mac? If so that would explain why you can't reproduce the issue, since the problem command is skipped on AArch64.
Thanks for the explanation. Yes, I am on an ARM Mac.
@browner12 You can reproduce the issue on an ARM Mac using Docker:
docker run -it --rm --platform linux/amd64 ubuntu:jammy
Running the following in Docker will cause the error described above:
apt-get update \
&& apt-get install -y wget \
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb \
&& dpkg -i /tmp/chrome.deb
I don't use Homestead anymore and stumbled across this PR by chance, but I would suggest the following change to fix it:
-dpkg -i /tmp/chrome.deb
+apt-get install -y /tmp/chrome.deb
The following will work inside the amd64 docker image:
apt-get update \
&& apt-get install -y wget \
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/chrome.deb \
&& apt-get install -y /tmp/chrome.deb
@vintagesucks I think I went with doing it this way assuming there was a reason dpkg
was used directly, but just using apt-get
is definitely a lot cleaner than adding it in a separate step, and I don't see a reason not to.
After the recent changes in #1932, the Chrome Web Driver installation script fails. This PR fixes this by ensuring that
apt-get
is called with--fix-broken install
afterwards, to ensure that the dependencies are resolved and google-chrome-stable is actually configured.