无法运行 browserstack-cypress

问题描述

我正在尝试运行 browserstack-cypress-clibrowserstack-cypress run --sync

我不断收到:

[3/15/2021,4:34:03 PM] - info: Reading config from C:\test\browserstack.json
[3/15/2021,4:34:03 PM] - info: Validating the config
[3/15/2021,4:34:03 PM] - info: Creating tests.zip with files in .
[3/15/2021,4:34:04 PM] - info: Uploading the tests to browserstack
[3/15/2021,4:34:04 PM] - error:
{
  message: 'Client network socket disconnected before secure TLS connection was established',stack: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '    at connResetException (internal/errors.js:604:14)\n' +
    '    at TLSSocket.onConnectEnd (_tls_wrap.js:1513:19)\n' +
    '    at Object.onceWrapper (events.js:417:28)\n' +
    '    at TLSSocket.emit (events.js:323:22)\n' +
    '    at endReadableNT (_stream_readable.js:1204:12)\n' +
    '    at processticksAndRejections (internal/process/task_queues.js:84:21)',code: 'ECONNRESET',path: null,host: 'api-cloud.browserstack.com',port: 443,localAddress: undefined
}
[3/15/2021,4:34:04 PM] - error: Zip Upload Failed.
[3/15/2021,4:34:04 PM] - info: Deleted tests.zip successfully.

Here 你可以找到我跟进的指南

解决方法

如果切换到不同的网络并执行相同的命令会发生什么?

对我来说似乎是网络问题。原因可能是您的网络上有一个具有 SSL 检查的代理。