wd icon indicating copy to clipboard operation
wd copied to clipboard

promiseChainRemote does not allow https

Open roelandvanbatenburg opened this issue 6 years ago • 1 comments

We are using kobiton to test our app. When upgrading wd from 1.11.4 to 1.12.1 we get the following error:

 FAIL  e2e/kobitonAndroid.test.e2e.ts
  ● Test suite failed to run

    TypeError: [quit()] Protocol "https:" not supported. Expected "http:"

      at Request.start (node_modules/request/request.js:751:32)
      at Request.end (node_modules/request/request.js:1511:10)
      at end (node_modules/request/request.js:564:14)
      at node_modules/request/request.js:578:7
      at Immediate._onImmediate (node_modules/@jest/fake-timers/build/jestFakeTimers.js:516:20)

This is caused by how we call promiseChainRemote:

const kobitonServerConfig = {
  protocol: 'https',
  host: 'api.kobiton.com',
  auth: `${username}:${apiKey}`,
};

const driver = wd.promiseChainRemote(kobitonServerConfig);

I'm not sure where to look for a fix. If you need any additional information I'm happy to provide it. Thanks!

roelandvanbatenburg avatar Feb 18 '20 12:02 roelandvanbatenburg

Just noticed this is picked up in https://github.com/admc/wd/pull/617

roelandvanbatenburg avatar Feb 19 '20 15:02 roelandvanbatenburg