Closed viralpraxis closed 5 months ago
@viralpraxis thanks for the report, will investigate
From the stacktrace, it looks like the collision is caused by the sniffer gem, not VCR. And the reason is that sniffer
by default uses alias_method
to patch Net::HTTP
, which is a deprecated approach and it's not compatible with prepend
patches that this SDK (and many other gems) use.
Fortunately, sniffer provides an option to load the patches with prepend
. Can you try applying them and let us know if that resolves the issue?
@st0012 Yep, applying gem "sniffer", require: %w[all_prepend sniffer]
fixed the issue. I clearly saw that conflict happens at sniffer
dependency of VCR, but didn't bother to read its docs.. Thank you!
Issue Description
We use Sentry in our RoR application alongside with VCR. For some reason, in order to make a new cassette within our RSpec testing suite we have to temporary disable Sentry initialization to make it working -- otherwise Sentry and VCR seem to get into a recursive loop (see details below) and application fails with
SystemStackError
exceptionReproduction Steps
Net::HTTP
takes execution control anSystemStackError: stack level too deep
occurs with repeated backtrace chunks:Ruby: MRI 3.3.0 capistrano-sentry (0.4.2) sentry-rails (5.16.1) sentry-ruby (5.16.1) sentry-sidekiq (5.16.1)
sniffer (0.5.0) vcr (6.2.0)
Temporary removing sentry initializer fixes the issue
Expected Behavior
I expect no exception to occur
Actual Behavior
Ruby Version
3.3.0
SDK Version
5.16.1
Integration and Its Version
Rails 7.1.3.2 sniffer (0.5.0) vcr (6.2.0)
Sentry Config