webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO
https://webdriverio-community.github.io/wdio-vscode-service/
MIT License
33 stars 28 forks source link

Support HTTP_PROXY #86

Closed openscript closed 10 months ago

openscript commented 11 months ago

Unfortunately I need to run the tests in an environment, where I can only access the internet through a proxy. wdio-vscode-service uses undici for it's requests. undici doesn't support the most common way to define proxies: https://github.com/nodejs/undici/issues/1650

It doesn't look like undici will support this any time soon. Native fetch is slowly arriving, but types are not included for Node 18. node-fetch would work, as it supports HttpAgents.

Is there another workaround I haven't thought of?

https://github.com/webdriverio-community/wdio-vscode-service/blob/17522803666322102a9a082512792dd030d667dc/src/launcher.ts#L8C26-L8C32

christian-bromann commented 11 months ago

Thanks for reporting!

Switching to node-fetch makes sense since we will switch to native fetch in WebdriverIO with the next upgrade and this would make this transition easier.

We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!

openscript commented 11 months ago

I decided against switching to node-fetch as the API of undici should be on par and I think moving to native fetch should be easy.

christian-bromann commented 10 months ago

Thanks for raising a PR. It is merged and will be released next.