Unable to get Headless Chrome to work on AWS Linux 2

0

I fired up a brand new instance of Amazon's Linux 2 AMI (HVM) (Kernel 5.10) and installed with the standard intoli script:

curl -k https://intoli.com/install-google-chrome.sh | bash

Here is the failure:

[root@tst05 chrome]# google-chrome-stable --headless --no-sandbox https://google.com [0204/195107.973900:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. [0204/195108.002857:WARNING:sandbox_linux.cc(385)] InitializeSandbox() called with multiple threads in process gpu-process. [0204/195110.137419:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [0204/195110.137474:WARNING:property.cc(144)] DaemonVersion: GetAndBlock: failed. [0204/195110.137667:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [0204/195110.137862:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files

I've also tried running yum install google-chrome-stable and the same result.

Do you have any suggestions?

asked a year ago844 views
2 Answers
0

An alternative to installing via this script, is to use the Extra Packages for Enterprise Linux repo and install Chromium from there. On Amazon Linux 2 the following commands will install Chromium.

# Enable Extra Packages for Enterprise Linux 
sudo amazon-linux-extras install epel -y

sudo yum install -y chromium

Running Chromium should work, as chromium-browser --headless --disable-gpu --remote-debugging-port=9222 https://www.chromestatus.com

AWS
Steve
answered a year ago
0

Thanks, but we need to use Chrome because of the interfaces we are using with Selenium in our app.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions