Closed shivaprakashwsv closed 1 year ago
Without any stack trace it just looks like a domain issue. Make sure you’re passing it correctly and don’t include https protocol if you’re using it. If you have more issues include the stack and your wdio options.
@billylam , Apologies below are the details Reporter options provided: ['wdiov5testrail', { domain: 'testrail.######.com', username: constants.TESTRAIL_USERNAME, password: constants.TESTRAIL_APIKEY, projectId: 38, suiteId: 226, runId: 3005, }],
Error Stack:
2023-06-13T04:04:57.128Z ERROR @wdio/cli:utils: Error in onCompleteHook: Error: connect ETIMEDOUT 54.79.13.209:443
at extractValue (C:\work\wdio####\node_modules\sync-rpc\lib\index.js:165:19)
at C:\work\wdio####\node_modules\sync-rpc\lib\index.js:175:12
at request (C:\work\wdio####\node_modules\sync-request\lib\index.js:28:15)
at TestRailApi.get (C:\work\wdio####\node_modules\wdio-wdiov5testrail-reporter\src\testrailApi.js:139:22)
at TestRailApi.createTitle (C:\work\wdio####\node_modules\wdio-wdiov5testrail-reporter\src\testrailApi.js:32:29)
at Object.cleanup (C:\work\wdio####\node_modules\wdio-wdiov5testrail-reporter\src\util.js:56:12)
at Object.onComplete (C:\work\wdio####\conf\wdio.conf.ado.ts:88:20)
at file:///C:/work/wdio/####/node_modules/@wdio/cli/build/utils.js:102:19
at Array.map (
It does look like a domain issue. testrailApi.js:139 corresponds to this GET call:
const response = request(
'GET',
`https://${this.options.domain}/index.php?/api/v2/get_suite/226`,
{ headers: this.headers },
);
If you make a call directly to the testrail api in Postman or command line, does it work?
https://support.testrail.com/hc/en-us/articles/7077936624276-Suites#getsuite
Yes, below returned for https://testrail.####.com/index.php?/api/v2/get_suite/226 { "id": 226, "name": "Dummy_Auto_Shakeout_Suite", "description": null, "project_id": 38, "is_master": false, "is_baseline": false, "is_completed": false, "completed_on": null, "url": "http://testrail.###.com/index.php?/suites/view/226" }
I'm not sure what's going on. I would try adding a console.log statement to testrailApi.js to https://github.com/billylam/wdio-wdiov5testrail-reporter/blob/master/src/testrailApi.js#L139.
console.log( `https://${this.options.domain}/index.php?/api/v2/${path}`);
console.log(JSON.stringify(this.headers, null, 2));
This might help us figure out if the url or headers (auth) are wrong.
Extremely sorry, Please close this ticket as this is an issue with API key. Since Apologies.
Hi, I am facing below error at onCompleteHook. Could you please help advise root cause. ERROR @wdio/cli:utils: Error in onCompleteHook: Error: connect ETIMEDOUT 13.210.86.123:443