samedi 20 mars 2021

TravisCI - Google Chrome stable cannot be authenticated

I'm trying to add TravisCI to my project, but I won't stop getting this error when triggering the builds:

WARNING: The following packages cannot be authenticated!
google-chrome-stable E: There were unauthenticated packages and -y was used without --allow-unauthenticated apt-get.diagnostics apt-get install failed The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable" failed and exited with 100 during .

I've searched for an answer and I found that adding chrome: stable in the addons section should fix it, but it's still failing. This is the .travis.yml file:

dist: trusty
sudo: false

language: node_js
node_js:
  - "10"

addons:
  chrome: stable
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable

cache:
  directories:
     - ./node_modules

install:
  - cd project/projectName
  - npm install

script:
  - npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
  - npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js

And this is the full log:

Worker information
0.17s0.01s0.00s0.01s
system_info
Build system information
0.00s0.00s6.03s0.00s4.23s0.00s1.26s
docker_mtu_and_registry_mirrors
docker stop/waiting
resolvconf
resolvconf stop/waiting
Adding APT Sources
0.16s$ curl -sSL "https://build.travis-ci.com/files/gpg/google-chrome.asc" | sudo -E apt-key add -
OK
0.01s$ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list >/dev/null
7.82s$ travis_apt_get_update
Installing APT Packages
0.50s$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  indicator-application libappindicator1 libappindicator3-1 libdbusmenu-glib4
  libdbusmenu-gtk3-4 libdbusmenu-gtk4 libindicator3-7 libindicator7
Use 'sudo apt autoremove' to remove them.
Recommended packages:
  libu2f-udev libvulkan1
The following packages will be upgraded:
  google-chrome-stable
1 upgraded, 0 newly installed, 0 to remove and 303 not upgraded.
Need to get 75.8 MB of archives.
After this operation, 59.1 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  google-chrome-stable
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
apt-get.diagnostics
apt-get install failed
The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable" failed and exited with 100 during .
Your build has been stopped.

How could I fix this? Also, since the root folder (where the .travis.yml file is) isn't where the app is located (it is under root/project/projectName), I wrote - cd project/projectName before doing the -npm install, I don't know if thats the correct way of doing it, so I'd also like to check that.

Thanks!

Aucun commentaire:

Enregistrer un commentaire