puffing-billy: Chrome 72 breaking stubs
Chrome version: 72.0.3626.81-1
We had our CI set up to install the latest chrome and our test suite suddenly broke today. Reverting the Chrome version to 71 fixed it. We are stubbing:
proxy.stub(/mockstripe/).and_return(body: mock_stripe)
and the error in CI was:
2019-01-29 21:20:24 +0000: Rack app error handling request { GET /javascripts/mockstripe/v2.js }
#<ActionController::RoutingError: No route matches [GET] "/javascripts/mockstripe/v2.js">
Seems like the new version of chrome was requesting something different and got around the proxy? Let me know if I can provide more info.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 15
Commits related to this issue
- turn off autocomplete feature specs that depend on puffing billy until https://github.com/oesmith/puffing-billy/issues/259 is resolved — committed to Digital-Repository-of-Ireland/dri-app by ConorSheehan1 5 years ago
To overcome below error
I’ve added following option
I’ve figured out how to install two different version of Google Chrome. I can use Chrome 72 for my main browser, and I have a separate installation of Chrome 71 that I use to run my tests (until this issue is sorted out.)
I downloaded Chrome 71 from the link above, and I dragged the “Google Chrome” application into
/Applications. When Mac OS asked about the duplicate file, I chose “Keep Both” (which copied it to “Google Chrome 2”.) Then I renamed “Google Chrome 2” to “Google Chrome 71”.I have the
osgem in my Gemfile (gem 'os'), which I use to detect Mac (development) or Linux (CI and prod).In my Capybara configuration, I set the binary in the chrome options:
This option makes chromedriver use the Google Chrome at
/Applications/Google Chrome 71.app.Here’s the complete driver configuration that I’m using with Capybara:
Hope that helps someone, and I look forward to getting this fixed in Chrome 72.
@ndbroadbent agreed, the
--tls13-variant=disabledswitch doesn’t seem to have any effect in headless mode.I’ve done some more tests on this and managed to get something working with headless, but it requires code changes in
puffing-billyand pointing to theeventmachinemaster branch.eventmachinepushed some changes to deal with TLS 1.3 a few weeks ago, so I’ve first tried updating it and hoped that everything would work fine, but theChange Cipher TLS_AES_128_GCM_SHA256still happens and lead to the same infinite loop.This being said, it is possible for
puffing-billyto be more restrictive when it initiates the TLS handshake and explicitly disable TLS 1.3 by passing an extrassl_version: ['TLSv1_2']argument to this call https://github.com/oesmith/puffing-billy/blob/088bbc94ec91076df7f28fa9630d4b84ddc761e5/lib/billy/proxy_connection.rb#L56This unfortunately only works in combination with the
eventmachineTLS1.3 changes because unless specifically disabled, OpenSSL will default to having it in its list of supported protocols.TL; DR; There seems to be two options in fixing this: explicitly disabling TLS1.3 support in
puffing-billyonceeventmachinegets released or figuring out why theChange Ciphertriggers this infinite loop. I unfortunately don’t have time at this point to dig deeper in how eventmachine works, but maybe previous contributors topuffing-billycould pitch in.