admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 404 forks source link

fix: Use https for https #617

Closed KazuCocoa closed 3 years ago

KazuCocoa commented 4 years ago

Current implementation leads below error when wd tries to connect to https since webdriver always refers http module.

[0] TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
[0]     at new ClientRequest (_http_client.js:144:11)
[0]     at Object.request (https.js:309:10)
[0]     at Request.start (/Users/kazu/GitHub/appium-desktop/node_modules/request/request.js:751:32)
[0]     at Request.write (/Users/kazu/GitHub/appium-desktop/node_modules/request/request.js:1497:10)
[0]     at end (/Users/kazu/GitHub/appium-desktop/node_modules/request/request.js:549:18)
[0]     at Immediate._onImmediate (/Users/kazu/GitHub/appium-desktop/node_modules/request/request.js:578:7)
[0]     at processImmediate (internal/timers.js:439:21)
[0] 11:36:14.414 › Killing session for window with id: 3

I checked https works on AppiumDesktop with this change.

khanhdodang commented 4 years ago

Hi @admc Can you please merge this PR?

martinheidegger commented 4 years ago

Bumping this, its really uncomfortable to send api keys over http 😅

roaringUnicorn commented 3 years ago

Merge and release would be great please !

diegoperini commented 3 years ago

Bumping this, its really uncomfortable to send api keys over http 😅

Yes. <3

I also tried connecting to an endpoint over 443 without specifying a protocol. It fails. (tested on latest released version, not this PR)

admc commented 3 years ago

Thanks for the PR!

diegoperini commented 3 years ago

Hi @admc , can we expect a new release anytime soon?

admc commented 3 years ago

Hi folks, I would like to publish this, but something is broken with publishing and has been for a month or so:

npm ERR! 404 Not Found - PUT https://registry.npmjs.org/wd - Not found

I haven't worked on this project for years and the folks who took over and moved on to new things. If anyone is interested in managing and maintaining this project, I would be happy to hand over the reigns.

Regards, Adam

jlipps commented 3 years ago

@admc i can try, what sort of publish is this? minor or patch?

admc commented 3 years ago

I think a minor version would be fine, thanks @jlipps !

jlipps commented 3 years ago

ok 1.13.0 is published, someone check it out and let me know if it works

diegoperini commented 3 years ago

I verify https works perfectly! I just grabbed my old non-working project, upgraded wd and retried. It launched a session just like it is http by only recognizing the URL. Thank you everyone!