TestCafe脚本VPN环境运行失败,远程桌面正常求解决
TestCafe脚本在VPN环境下请求页面失败,报Parse Error(远程桌面执行正常)
我被这个问题折腾好几天了,想求助各位大神:通过远程桌面登录工作电脑时,我的TestCafe脚本运行完全正常;但切换到VPN环境直接运行相同脚本时,就会出现请求https://website.com/page失败的错误,错误详情为Parse Error。
相关配置与代码
package.json中的脚本配置
"ssc": "testcafe chrome ./Fixtures/"
测试代码
fixture `Checking layout of website`.page `https://website.com/page` .beforeEach( async t=> { console.log("Logging in") await t.useRole(regularAccUser); }) test('Checking stuff', async t=> { await t.takeScreenshot() })
报错信息
A request to "https://website.com/page" has failed. Use quarantine mode to perform additional attempts to execute this test. You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx". Error details: Failed to perform a request to the resource at "https://website.com/page" because of an error. Error: Parse Error
日志文件内容
0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'ssc' ] 2 info using npm@6.14.4 3 info using node@v10.21.0 4 verbose run-script [ 'pressc', 'ssc', 'postssc' ] 5 info lifecycle smoke9@0.0.0~pressc: smoke9@0.0.0 6 info lifecycle smoke9@0.0.0~ssc: smoke9@0.0.0 7 verbose lifecycle smoke9@0.0.0~ssc: unsafe-perm in lifecycle true 8 verbose lifecycle smoke9@0.0.0~ssc: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Automation\smoke\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Git\cmd;C:\Users\ext-krishnanv\Desktop\Eclipse\eclipse\java-1.8.0-openjdk-1.8.0.222-2.b10.ojdkbuild.windows.x86_64\bin;C:\Installation\spark-2.2.1\bin;C:\Installation\scala\bin;C:\Anaconda3;C:\Anaconda3\Scripts;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\apache-jmeter-5.3\bin;C:\Users\beckettj1\AppData\Local\Microsoft\WindowsApps;C:\Users\<username>\AppData\Roaming\npm 9 verbose lifecycle smoke9@0.0.0~ssc: CWD: C:\Automation\smoke 10 silly lifecycle smoke9@0.0.0~ssc: Args: [ '/d /s /c', 'testcafe chrome ./Fixtures/<subdirectory>/' ] 11 silly lifecycle smoke9@0.0.0~ssc: Returned: code: 1 signal: null 12 info lifecycle smoke9@0.0.0~ssc: Failed to exec ssc script 13 verbose stack Error: smoke9@0.0.0 ssc: `testcafe chrome ./Fixtures/<subdirectory>/` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid smoke9@0.0.0 15 verbose cwd C:\Automation\smoke 16 verbose Windows_NT 10.0.17134 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ssc" 18 verbose node v10.21.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error smoke9@0.0.0 ssc: `testcafe chrome ./Fixtures/<subdirectory>/` 22 error Exit status 1 23 error Failed at the smoke9@0.0.0 ssc script. **<----IS THIS A RED HERRING??---->** 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
注:./Fixtures/为所有js/ts脚本的存放路径。
内容的提问来源于stack exchange,提问作者yorkshireflatcap
相关产品推荐
相关产品推荐

