bermi / sauce-connect-launcher

Downloads and launches an instance of Sauce Connect Selenium Proxy https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy
72 stars 68 forks source link

Document disabling SSL bumping #115

Open julkue opened 7 years ago

julkue commented 7 years ago

I've had many troubles the last weeks getting around SSL popups that blocked my tests from executing. They occured before my actual tests were initialized, by the default google.com domain that was opened in the browser:

oaccdhgalakgagbl

After many emails SauceLabs replied:

Hi Julian,

Apologizes for the delayed response as were in a company off-site and support assistance was limited in between meetings. All of our Android VMs are booted with the Android stock browser launching the defaulted Google home page before your test is implemented.

What’s happening is that Sauce Connect does a re-encryption in which it takes the original certificate of the site that you are trying to access and re-encrypts it with the Sauce Lab’s CyberVillains certificate. We noticed that for Android 4.4 the stock browser in the emulator classifies the CyberVillains certificate as a not trusted authority and that is why it shows this Security Warning prompt.

Since you mentioned this test has worked previously on the Android 4.4 emulator in the past, can you provide the Sauce job URL so I can take a closer look into it? Thanks for your patience and understanding.

Regards,
Albert

and

Hi Julian,

Thanks for the Sauce job URL. We have recently ended support for Selendroid earlier this month, which was used with Karma tests in the past with Android 4.4 web tests (https://wiki.saucelabs.com/pages/viewpage.action?pageId=67012495). With Selendroid a different underlying browser was used, which was not affected by the certificate pop-up you encountered.

As you can see in your passing Sauce job URL, the following lines appear in the selenium-server.log:
Jan 04, 2017 9:31:12 AM io.selendroid.SelendroidLauncher launchServer
INFO: Starting selendroid-server port 4443

Now all Android 4.4 web tests will use Appium by default moving forth. If you look at the appium-server.log in the Sauce failing tests, you will the following lines:
2017-01-06 20:44:27:072 – info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
2017-01-06 20:44:27:074 – info: Appium REST http interface listener started on 0.0.0.0:4443

Using the (-B all) or (—no-ssl-bump-domains all) flag with Sauce Connect will be required when testing against Android 4.4. Thanks for your patience and understanding.

Regards,
Albert

As no one with Karma can now execute tests on Android 4.4 without adding --no-ssl-bump-domains or -B (which doesn't seem to work btw, see https://github.com/karma-runner/karma-sauce-launcher/issues/110) I think this should be explicitly documented (at least the option).

johanneswuerbach commented 7 years ago

Sounds good to me, PR welcome 👍 -B would needed to be added here https://github.com/bermi/sauce-connect-launcher/blob/master/lib/process_options.js#L4 to work.