断开连接重新连接在X MS的超时之前失败(传输关闭)
我在Windows上使用-NO-SandBox标志在Windows上运行测试很难。没有它,它没有问题,但是如果没有问题,我会得到错误
断开连接在X MS(传输关闭)超时之前的重新连接
超时范围内失败,它运行的是没有问题的毫无问题,没有标志,它说它不受支持或类似的东西。
您是否遇到过这样的问题?您是如何解决它们的?
我在堆栈和网上检查了大多数问题,但似乎没有解决这个问题。
我尝试了 - 设置其他不同的标志,但是我尝试删除此标志的设置都没有工作
- 但这在Docker中需要。
我尝试更新所有测试库 - 没有任何帮助。
这是我的业力配置
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
// this ensures we always have a fresh chrome copy
// and that it's usable in a ci/cd perspective
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function (config) {
config.set({
debugMode: true,
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
random: false
}
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/Frontend'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: [
'--no-sandbox']
}
},
singleRun: true,
restartOnFileChange: true,
});
};
I have trouble running tests on Windows with the --no-sandbox flag. Without it, it works with no issues, but if not then I get the error
Disconnected reconnect failed before timeout of x ms (transport close)
Within the docker it runs with no issues with --no-sandbox flag and without the flag it says that it's not supported or something like that.
Have you experienced such issues? How did you manage to solve them?
I checked most of the questions on stack and on the web, but it seems that nothing solves this issue.
I tried - setting additional, different flags, but none of the setups worked
I tried removing this flag - but that's needed in docker.
I tried updating all of the test libraries - nothing helps.
Here is my karma config
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
// this ensures we always have a fresh chrome copy
// and that it's usable in a ci/cd perspective
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = function (config) {
config.set({
debugMode: true,
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
random: false
}
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/Frontend'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: [
'--no-sandbox']
}
},
singleRun: true,
restartOnFileChange: true,
});
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果可能的话,您可以有2个脚本。
尝试进行以下更改:
package.json
这样。基本上是一个用于Windows测试的脚本,另一个用于Docker/CI/CD的脚本。
If possible, you can have 2 scripts.
Try making the following changes:
package.json
Something like that. Basically one script for the tests in Windows and another for the Docker/CI/CD.