ChromeDriver "IllegalState The driver is not executable"

sudo: required
dist: trusty
language: java
jdk:
 - oraclejdk8
addons:
  chrome: stable
before_install:
  - # start your web application and listen on `localhost`
  - wget http://chromedriver.storage.googleapis.com/73.0.3683.68/chromedriver_linux64.zip
  - unzip chromedriver_linux64.zip
  - sudo apt-get install libnss3
  - sudo apt-get --only-upgrade install google-chrome-stable
  - sudo cp chromedriver /usr/local/bin/.
  - sudo chmod +x /usr/local/bin/chromedriver
install:
 - mvn -N io.takari:maven:wrapper
 - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
 - google-chrome --version
 - chromedriver --version
before_script:
   - export DISPLAY=:99.0
   - sh -e /etc/init.d/xvfb start

I’m trying to use selemium tests on Travis with Chrom Headless, but I’m getting this error:

IllegalState The driver is not executable

Please include a link to an affected build when reporting problems.

So far, the issue looks like a duplicate of:

You are also using Trusty which is EOL, so whatever Chromedriver you are installing may not support it anymore.

Sorry, it’s my first time writing in this forum.

I have a private repo, so I guess that it makes no sense to inlude the link.

https://travis-ci.com/github/rayo329/WingsForge

Is there another option for “trusty”?

[ERROR]   PeticionesTest.caso1:45 » IllegalState The driver is not executable: /home/tra...
[ERROR]   SeleniumTests.testGooglePage:23 » IllegalState The driver is not executable: /...

I made also some changes to my travis.yml but I’m getting the same errors.

sudo: required
dist: trusty
language: java
jdk:
 - oraclejdk8
 addons:
 chrome: stable
 apt:
   packages:
     - chromium-chromedriver
before_install:

before_script:
- CHROME_MAIN_VERSION=`google-chrome-stable --version | sed -E 's/(^Google Chrome |\.[0-9]+ )//g'`
- CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_MAIN_VERSION"`
- curl "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" -O
- unzip chromedriver_linux64.zip -d ~/bin
install:
 - mvn -N io.takari:maven:wrapper
 - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V

This is my selenium test in Spring Boot

System.setProperty("webdriver.chrome.driver", "./seleniumdriver/chromedriver/chromedriver.exe");
	//driver = new ChromeDriver();
	
	WebDriver driver = new ChromeDriver();
	js = (JavascriptExecutor) driver;
	vars = new HashMap<String, Object>();

The 1st in google on “IllegalState The driver is not executable” is

which suggests that you need to set the executable bit in Chromedriver executable file’s permissions.