You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue where VCR still tries to open a TCP connection when using a cassette, even though the cassette is used to replay the response.
However, when net_http_connect_on_start is enabled, there are still requests "to the outside world" happening when using a cassette. As I can't reach that endpoint, the tests fail with the following error:
ActionView::Template::Error: Failed to open TCP connection to [redacted].my.salesforce.com (getaddrinfo: nodename nor servname provided, or not known)
Using Wireshark, I can see that the requests still happen (and fail):
1397 60.862527 2a02:1812:1437:b700:9164:b508:190c:1dc2 2a02:1800:100::42:2 DNS 116 Standard query 0x89ea A [redacted].my.salesforce.com
1398 60.862722 2a02:1812:1437:b700:9164:b508:190c:1dc2 2a02:1800:100::42:2 DNS 116 Standard query 0xe21d AAAA [redacted].my.salesforce.com
1399 60.881073 2a02:1800:100::42:2 2a02:1812:1437:b700:9164:b508:190c:1dc2 DNS 169 Standard query response 0x89ea No such name A [redacted].my.salesforce.com SOA dns01.salesforce.com
1400 60.883525 2a02:1800:100::42:2 2a02:1812:1437:b700:9164:b508:190c:1dc2 DNS 169 Standard query response 0xe21d No such name AAAA [redacted].my.salesforce.com SOA dns01.salesforce.com
When I disable net_http_connect_on_start, the tests run (and the VCR is used, otherwise the same issue would occur and I see that the requests are matched in my VCR log).
I'm using:
Ruby 2.7.6p219
vcr (5.0.0) (issue persisted when bumping to 6.1.0)
net-http2 (>= 0.18.3, < 2)
webmock (3.12.2) (issue persisted when bumping to 3.14)
rails (6.1.6)
rspec (3.10.0)
Is this a bug as VCR should never try to reach "the outside world" when using a cassette?
Is this something I can work around in configuration?
The text was updated successfully, but these errors were encountered:
Hello,
I'm experiencing an issue where VCR still tries to open a TCP connection when using a cassette, even though the cassette is used to replay the response.
I believe the issue is related to the interaction between VCR and WebMock. In our configuration, we disable the
net_http_connect_on_start
setting of WebMock (https://github.com/bblimke/webmock#connecting-on-nethttpstart) to get around an issue with Capybara (see last point of https://github.com/teamcapybara/capybara#gotchas).However, when
net_http_connect_on_start
is enabled, there are still requests "to the outside world" happening when using a cassette. As I can't reach that endpoint, the tests fail with the following error:Using Wireshark, I can see that the requests still happen (and fail):
When I disable
net_http_connect_on_start
, the tests run (and the VCR is used, otherwise the same issue would occur and I see that the requests are matched in my VCR log).I'm using:
Ruby 2.7.6p219
vcr (5.0.0) (issue persisted when bumping to 6.1.0)
net-http2 (>= 0.18.3, < 2)
webmock (3.12.2) (issue persisted when bumping to 3.14)
rails (6.1.6)
rspec (3.10.0)
Is this a bug as VCR should never try to reach "the outside world" when using a cassette?
Is this something I can work around in configuration?
The text was updated successfully, but these errors were encountered: