gitlab/codeceptjs测试昨天工作正常,现在它们甚至无法启动 [英] gitlab/codeceptjs tests were working fine yesterday now they can't even start

查看:83
本文介绍了gitlab/codeceptjs测试昨天工作正常,现在它们甚至无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个月前,我使用codeceptjs/puppeteer在gitlab上进行了一些测试.我的测试有0个问题.今天早上,我醒了,对每个应用程序的每个测试都在应用程序启动之前就失败了.超过4周没有更新任何测试.到目前为止,他们自己都运转良好.

months ago I made some tests on gitlab using codeceptjs/puppeteer. I was having 0 issues with the tests. this morning I woke up and every single test on every single app is failing before the apps even begin. none of the tests have been updated in 4+ weeks. they were running fine all on their own until now.

现在,在第一次测试甚至开始之前,我每次都会收到此错误

Now I get this error every single time before the first test even starts

`example -- user inserts text and html macro :heavy_multiplication_x: "before each" hook: codeceptjs.before for "user inserts text and html macro" in 13ms Error: Failed to launch the browser process!`

我不知道是什么原因造成的.我做了一些谷歌搜索,所有以前的问题都说,将"args":["--no-sandbox","--disable-setuid-sandbox"] 添加到配置中可以解决此问题,但是我已经在我的配置文件中了.它已经存在于我的配置文件中了几个月了.不知道昨晚和今晚之间发生了什么变化.这是我的gitlab-ci.yml文件

I have no idea what is causing this. I did some googling and all previous issues say that adding "args": ["--no-sandbox", "--disable-setuid-sandbox"] to the config will solve this problem but I already had that in my config file. it's been in my config file for months now. not sure what changed between last night and tonight. this is my gitlab-ci.yml file

`image: node:latest 


all_tests:
  script:
    - apt-get update && apt-get install -yq libgconf-2-4
    - apt-get update && apt-get install -y wget --no-install-recommends && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont --no-install-recommends && rm -rf /var/lib/apt/lists/* && apt-get purge --auto-remove -y curl && rm -rf /src/*.deb
    - npm install
    - npm i codeceptjs-puppeteer
    - npm i codeceptjs puppeteer
    - ln -sf ./node_modules/.bin/codeceptjs /usr/local/bin/codeceptjs
    - npm i --save arrify
    - ./node_modules/.bin/codeceptjs run --steps


cache:
  paths:
    - ./node_modules/.bin/codeceptjs

after_script:
    - echo "Cleaning up"
    - rm -rf "%CACHE_PATH%/%CI_PIPELINE_ID%" 
`

几个月前,我从gitlab的一个回购中提取了该信息,该回购具有可进行伪造者测试的测试,因为我不知道如何构建一个可以正常运行的软件.codeceptjs/puppeteer有一个配置文件,这里是内容

months ago I pulled that from a repo on gitlab that had working puppeteer tests since I couldn't figure out how to build a properly working one. codeceptjs/puppeteer has a config file here are the contents

`exports.config = {
  tests: './tests/test_test.js',
  output: './output',
  helpers: {
    Puppeteer: {
      url: 'http://localhost',
      show: false,
      chrome: {
          "args": ["--no-sandbox", "--disable-setuid-sandbox"]
      }
    }
  },
  include: {
    I: './steps_file.js',
    login: './pages/login.js',
    confluence: './pages/confluence.js',
    editor: './pages/editor.js',
  },
  bootstrap: null,
  mocha: {},
  name: 'cloud ME user'
};`

是的,那个配置对我来说好几个月了,直到昨晚突然突然失败了.我读到的所有内容都说我需要指定chrome是无头的,但我已经尝试过了.我几个月前尝试过.任何人都不知道是什么原因造成的吗?

so yeah that config was working fine for me for months until last night when all of a sudden it failed. everything I read says I need to specify that chrome is headless but I already tried that. I tried that months ago. anyone have any idea what is causing this?

推荐答案

您的构建配置使用 node:latest 作为基础映像.显然,昨天已更改(请参阅 README节点的md).版本库从版本13到14.

Your build config is using node:latest as the base image. Apparently, that has been changed yesterday (see the README.md of node docker repository from version 13 to 14.

您可以尝试将节点映像降级到版本13:

You could try downgrading the node image back to version 13:

image: node:13

或者根据您的需求更具体的东西.

Or even something more specific according to your needs.

这篇关于gitlab/codeceptjs测试昨天工作正常,现在它们甚至无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆