-
Notifications
You must be signed in to change notification settings - Fork 90
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
Installation Instructions #55
Comments
|
Also related (sorry, internal only): https://crbug.com/1433228 ("CfT cannot run on many cloud environments (same for Chromium)") |
@thiagowfx Yeah, I found that Stackoverflow link. That's where I got the suggestion about the dependencies. But I wasn't sure if that is the official suggested way of doing things. If that is the expected way, it would be great to have a brief explanation in the repo |
It's not official, I was just linking it for completeness. Your original FR is still valid, docs regarding dependencies could be improved :-) |
I ordinarily just fetch the zip file, extract, then use a shell script to launch Chrome or Chromium. I would not mix Debian (PPA or official releases) with the Chrome-For-Testing or Chromium Developer Build. Something like
Then create a shell script,
|
@guest271314 Thanks for this. Absolutely agree that installing the Debian Chrome package is asking for trouble. But just unzipping the zip and running the binary doesn't seem to work for me. I get various shared libraries errors ( So some official info on how to run the provided binaries as-is, or some way to work out and install the required binaries would be great. |
If you are on Debian you shouldn't be getting errors. I do the same process for Chromium from https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots. Do you have
|
I've actually done the same thing with |
There shouldn't be any dependencies. Just make sure |
@guest271314 No snap or anything. Should have mentioned I'm running in docker on the # Dockerfile
FROM ubuntu:jammy
RUN apt-get -y update
RUN apt-get install -y wget unzip
RUN wget --output-document chrome.zip \
https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/117.0.5938.88/linux64/chrome-linux64.zip \
&& unzip chrome.zip && rm chrome.zip Building: docker build -t cft-test . Running the binary directly as in your example: docker run --rm cft-test ./chrome-linux64/chrome Output: ./chrome-linux64/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory So it definitively seems that in docker at least there is a required undocumented "install dependencies" step. Unless I'm missing something. |
Never tried Docker. Can't help you there. What happens when you are not running in Docker? |
@guest271314 No worries. I haven't tried it outside of docker. We need a reproducible container with access to these Chrome for Testing binaries for use in automated tests. It's probably working on your machine because you've already got the dependencies installed from somewhere else. |
I'm pretty sure Chromium is a standalone executable. |
I'm experiencing the same issue - same exact dependencies missing in Debian. I'm not really sure why it would matter that I'm running in Docker...? |
Probably not all dependencies are installed, depending on the base image you are using. I got it working with In the end i settled for the ones listed in |
The following is what I did to have Chrome for Testing working on an Amazon EC2 instance running Amazon Linux 2023. I hope this helps: With Node.js# A hacky way to install all the package dependencies required for Chrome for Testing.
# See: https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55
sudo dnf install --assumeyes --quiet findutils
sudo dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
grep provider | \
sort --unique | \
awk '{print $2}' | \
xargs sudo dnf install --best --allowerasing --skip-broken --assumeyes --quiet > /dev/null 2>&1
npx --yes @puppeteer/browsers install chrome@stable | \
awk '{print $2}' | \
xargs -I {} sudo ln --symbolic {} /usr/local/bin/chrome
npx --yes @puppeteer/browsers install chromedriver@stable | \
awk '{print $2}' | \
xargs -I {} sudo ln --symbolic {} /usr/local/bin/chromedriver Without Node.js# A hacky way to install all the package dependencies required for Chrome for Testing.
# See: https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55
sudo dnf install --assumeyes --quiet findutils jq unzip
sudo dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
grep provider | \
sort --unique | \
awk '{print $2}' | \
xargs sudo dnf install --best --allowerasing --skip-broken --assumeyes --quiet > /dev/null 2>&1
CHROME_FOR_TESTING_RELEASE="$(curl --silent https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq '.channels.Stable')"
CHROME_DOWNLOAD_URL="$(echo ""${CHROME_FOR_TESTING_RELEASE}"" | jq -r '.downloads.chrome[] | select(.platform == "linux64") | .url')"
curl --remote-name --silent "${CHROME_DOWNLOAD_URL}"
unzip -q chrome-linux64.zip
sudo ln --symbolic "${PWD}/chrome-linux64/chrome" /usr/local/bin/chrome
CHROMEDRIVER_DOWNLOAD_URL="$(echo ""${CHROME_FOR_TESTING_RELEASE}"" | jq -r '.downloads.chromedriver[] | select(.platform == "linux64") | .url')"
curl --remote-name --silent "${CHROMEDRIVER_DOWNLOAD_URL}"
unzip -q chromedriver-linux64.zip
sudo ln --symbolic "${PWD}/chromedriver-linux64/chromedriver" /usr/local/bin/chromedriver |
For Debian and Ubuntu - I am not talking about Docker - you can do this, here using Deno. I can adjust the code for use in Node.js, and Bun
|
@guest271314 that's way too much code. Chrome for Testing is for testing. And most testing in the world is automatic. The testing environments are lightweight, come with minimal libs preinstalled. Current CtF dists do not work out of the box, they're not automation-friendly. |
You don't get "automatic" testing automatically. You have to write code first. I don't think there is a single URL that we can do for Chrome-For-Testing what we can do for Chromium Developer Channel.
|
@dagguh Technically we can do this in the browser. However, the relevant files in
|
@dagguh If you want "automatically" you can run the code above in the browser, then again use Native Messaging from the browser to set the relevant files executable. All of the above can be automated. The "too much code" is N/A. I didn't know we were golfing here. If amount of code is an issue, we can golf this. |
I appreciate this thread, because we are having very similar issues.
It's a bit silly to note the "easiest" way when not acknowledging alternate, ostensibly less-easy, methods, eh? This all pre-supposes that the user has node/npm installed already, which I do not, so this is actually notably harder than providing a URL to a list of downloadable binaries, eg. |
|
This issue is still affecting developers and testers -- I had to dig up install instructions for Ubuntu from an obscure StackOverflow thread. A little instruction on how to get Chrome for Testing to run would be much appreciated next time around. |
Hi, I'm also trying to run Chrome for testing on Ubuntu, albeit in Docker. I was able to download the archive, but I don't understand what to do next. I found some instructions, but Chrome for testing still won't start. Could you send me a link to the instructions you found? |
Could some basic installation documentation be provided to show users how to make use of the provided binaries?
The blog page demonstrates the use of the
@puppeteer/browsers
package to install the binaries, but this isn't possible in all environments. And this repo doesn't mention anything about installation.I appreciate that it's complex to provide detailed instructions for every platform and use-case, but even some simple guidelines would be helpful. eg. "Download these, unzip to , mark as executable...".
I've managed to get everything working in a Debian-based container, but I'm not sure if I'm doing it right at all. For example, it appears that I also need to install the main Debian chrome package to install various dependencies the Chrome for Testing binary needs. I'm not sure if this is expected or not.
Anyway, thanks for working on this! The APIs and binaries work well, just a thought on user-experience.
The text was updated successfully, but these errors were encountered: