Cypress 和 Browserstack 内部服务器错误 Zip 上传失败
Cypress and Browserstack Internal Server Error Zip Upload Failed
我正在尝试 运行 我的 Cypress 在本地使用 Browserstack 进行测试,但不断收到以下错误。我尝试添加更多 npm 依赖项,尝试在启动 ./BrowserStackLocal
时添加 --local-identifier
但我一直收到此错误。从我在这里看到的情况来看 https://www.browserstack.com/docs/automate/cypress 即使使用我遵循的“设置本地测试”也应该一切正常,但它没有。
[4/14/2021, 8:52:51 AM] - info: Reading access key from the environment variable BROWSERSTACK_ACCESS_KEY
[4/14/2021, 8:52:51 AM] - info: Validating the config
[4/14/2021, 8:52:51 AM] - info: Creating tests.zip with files in .
[4/14/2021, 8:53:40 AM] - info: Uploading the tests to BrowserStack
[4/14/2021, 8:56:07 AM] - error: Internal Server Error!
[4/14/2021, 8:56:07 AM] - error: Zip Upload failed.
[4/14/2021, 8:56:07 AM] - info: Deleted tests.zip successfully.
我在 browerstack.json
中有以下 运行 设置
"cypress_config_file": "cypress.json",
"project_name": "Test",
"build_name": "Build no. 1",
"exclude": [],
"parallels": "5",
"npm_dependencies": {
"@types/node":"^14.0.22",
"browserstack-cypress-cli": "^1.8.1",
"cypress": "7.0.1",
"cypress-commands": "^1.1.0",
"cypress-localstorage-commands": "^1.4.1",
"cypress-react-selector": "^2.2.1",
"start-server-and-test": "^1.11.5",
"typescript": "^3.9.6",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "6.8.0",
"eslint-config-airbnb": "18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "^23.13.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "2.5.1"
},
"package_config_options": {},
"headless": true
},
"connection_settings": {
"local": true,
"local_identifier": "CypressLocalConnection1",
"local_mode": null,
"local_config_file": null
},
"disable_usage_reporting": false
我们之前遇到过类似的问题,后来遇到了创建 tests.zip 的文件大小限制为 200 MB。尝试使用他们的排除功能:https://www.browserstack.com/docs/automate/cypress/exclude-files 删除不需要的文件和文件夹以减小文件大小。
我正在尝试 运行 我的 Cypress 在本地使用 Browserstack 进行测试,但不断收到以下错误。我尝试添加更多 npm 依赖项,尝试在启动 ./BrowserStackLocal
时添加 --local-identifier
但我一直收到此错误。从我在这里看到的情况来看 https://www.browserstack.com/docs/automate/cypress 即使使用我遵循的“设置本地测试”也应该一切正常,但它没有。
[4/14/2021, 8:52:51 AM] - info: Reading access key from the environment variable BROWSERSTACK_ACCESS_KEY
[4/14/2021, 8:52:51 AM] - info: Validating the config
[4/14/2021, 8:52:51 AM] - info: Creating tests.zip with files in .
[4/14/2021, 8:53:40 AM] - info: Uploading the tests to BrowserStack
[4/14/2021, 8:56:07 AM] - error: Internal Server Error!
[4/14/2021, 8:56:07 AM] - error: Zip Upload failed.
[4/14/2021, 8:56:07 AM] - info: Deleted tests.zip successfully.
我在 browerstack.json
中有以下 运行 设置 "cypress_config_file": "cypress.json",
"project_name": "Test",
"build_name": "Build no. 1",
"exclude": [],
"parallels": "5",
"npm_dependencies": {
"@types/node":"^14.0.22",
"browserstack-cypress-cli": "^1.8.1",
"cypress": "7.0.1",
"cypress-commands": "^1.1.0",
"cypress-localstorage-commands": "^1.4.1",
"cypress-react-selector": "^2.2.1",
"start-server-and-test": "^1.11.5",
"typescript": "^3.9.6",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "6.8.0",
"eslint-config-airbnb": "18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "^23.13.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "2.5.1"
},
"package_config_options": {},
"headless": true
},
"connection_settings": {
"local": true,
"local_identifier": "CypressLocalConnection1",
"local_mode": null,
"local_config_file": null
},
"disable_usage_reporting": false
我们之前遇到过类似的问题,后来遇到了创建 tests.zip 的文件大小限制为 200 MB。尝试使用他们的排除功能:https://www.browserstack.com/docs/automate/cypress/exclude-files 删除不需要的文件和文件夹以减小文件大小。