gitlab/codeceptjs测试昨天工作正常,现在它们甚至无法启动

编程入门 行业动态 更新时间:2024-10-14 06:19:44
本文介绍了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 - dl-ssl.google/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] dl.google/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: '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测试昨天工作正常,现在它们甚至无法启动

本文发布于:2023-11-28 13:42:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642642.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法启动   昨天   测试   工作   gitlab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!