{"action":"created","issue":{"url":"https://api.github.com/repos/vcr/vcr/issues/494","labels_url":"https://api.github.com/repos/vcr/vcr/issues/494/labels{/name}","comments_url":"https://api.github.com/repos/vcr/vcr/issues/494/comments","events_url":"https://api.github.com/repos/vcr/vcr/issues/494/events","html_url":"https://github.com/vcr/vcr/issues/494","id":87271967,"number":494,"title":"Turning off VCR inside around_http_request seems to cause strange fibre errors","user":{"login":"brightbits","id":196514,"avatar_url":"https://avatars.githubusercontent.com/u/196514?v=3","gravatar_id":"","url":"https://api.github.com/users/brightbits","html_url":"https://github.com/brightbits","followers_url":"https://api.github.com/users/brightbits/followers","following_url":"https://api.github.com/users/brightbits/following{/other_user}","gists_url":"https://api.github.com/users/brightbits/gists{/gist_id}","starred_url":"https://api.github.com/users/brightbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brightbits/subscriptions","organizations_url":"https://api.github.com/users/brightbits/orgs","repos_url":"https://api.github.com/users/brightbits/repos","events_url":"https://api.github.com/users/brightbits/events{/privacy}","received_events_url":"https://api.github.com/users/brightbits/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vcr/vcr/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/vcr/vcr/labels/threadsafety","name":"threadsafety","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"krainboltgreene","id":334809,"avatar_url":"https://avatars.githubusercontent.com/u/334809?v=3","gravatar_id":"","url":"https://api.github.com/users/krainboltgreene","html_url":"https://github.com/krainboltgreene","followers_url":"https://api.github.com/users/krainboltgreene/followers","following_url":"https://api.github.com/users/krainboltgreene/following{/other_user}","gists_url":"https://api.github.com/users/krainboltgreene/gists{/gist_id}","starred_url":"https://api.github.com/users/krainboltgreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krainboltgreene/subscriptions","organizations_url":"https://api.github.com/users/krainboltgreene/orgs","repos_url":"https://api.github.com/users/krainboltgreene/repos","events_url":"https://api.github.com/users/krainboltgreene/events{/privacy}","received_events_url":"https://api.github.com/users/krainboltgreene/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-06-11T09:15:14Z","updated_at":"2016-01-18T21:19:49Z","closed_at":null,"body":"We are turning off VCR based on the uri, like so:\r\n\r\n```ruby\r\nVCR.configure do |c|\r\n  c.around_http_request(lambda {|r| r.uri =~ /<regexp>/}) do |request|\r\n    VCR.turned_off(&request)\r\n  end\r\n\r\n  c.ignore_localhost = true\r\n  c.cassette_library_dir = 'spec/support/fixtures/cassettes'\r\n  c.hook_into :webmock\r\n  c.configure_rspec_metadata!\r\n  c.default_cassette_options = { record: :none }\r\nend\r\n```\r\n\r\nSometimes we get this error:\r\n```\r\n  undefined method `resume' for nil:NilClass\r\n  \r\n  /<gem path>/vcr-2.9.3/lib/vcr/configuration.rb:510:in `resume_fiber'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/configuration.rb:405:in `block in around_http_request'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/variable_args_block_caller.rb:9:in `call'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/variable_args_block_caller.rb:9:in `call_block'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/hooks.rb:14:in `conditionally_invoke'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/hooks.rb:29:in `block in invoke_hook'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/hooks.rb:28:in `map'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/util/hooks.rb:28:in `invoke_hook'\r\n  /<gem path>/vcr-2.9.3/lib/vcr/library_hooks/webmock.rb:141:in `block in <module:WebMock>'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/callback_registry.rb:20:in `call'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/callback_registry.rb:20:in `block in invoke_callbacks'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/callback_registry.rb:15:in `each'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/callback_registry.rb:15:in `invoke_callbacks'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:89:in `block in request'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:98:in `call'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:98:in `block in request'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:105:in `call'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:105:in `block in request'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:137:in `start_with_connect_without_finish'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:104:in `request'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/server.rb:56:in `block in responsive?'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:123:in `start_without_connect'\r\n  /<gem path>/webmock-1.18.0/lib/webmock/http_lib_adapters/net_http.rb:150:in `start'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/server.rb:56:in `responsive?'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/server.rb:73:in `block in boot'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/server.rb:73:in `boot'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/session.rb:66:in `initialize'\r\n  /<gem path>/capybara-2.4.4/lib/capybara.rb:248:in `new'\r\n  /<gem path>/capybara-2.4.4/lib/capybara.rb:248:in `current_session'\r\n  /<gem path>/capybara-2.4.4/lib/capybara/dsl.rb:46:in `page'\r\n  ./spec/spec_helper.rb:53:in `block (2 levels) in <top (required)>'\r\n```\r\n\r\nIt appears that the fibre for the current thread doesn't exist after the request has been executed.. Any idea why this could be?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/vcr/vcr/issues/comments/172656434","html_url":"https://github.com/vcr/vcr/issues/494#issuecomment-172656434","issue_url":"https://api.github.com/repos/vcr/vcr/issues/494","id":172656434,"user":{"login":"clupprich","id":773,"avatar_url":"https://avatars.githubusercontent.com/u/773?v=3","gravatar_id":"","url":"https://api.github.com/users/clupprich","html_url":"https://github.com/clupprich","followers_url":"https://api.github.com/users/clupprich/followers","following_url":"https://api.github.com/users/clupprich/following{/other_user}","gists_url":"https://api.github.com/users/clupprich/gists{/gist_id}","starred_url":"https://api.github.com/users/clupprich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clupprich/subscriptions","organizations_url":"https://api.github.com/users/clupprich/orgs","repos_url":"https://api.github.com/users/clupprich/repos","events_url":"https://api.github.com/users/clupprich/events{/privacy}","received_events_url":"https://api.github.com/users/clupprich/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T21:19:48Z","updated_at":"2016-01-18T21:19:48Z","body":"I think I've run into the same issue (same setup, same stacktrace as above).\r\n\r\nI've bundled vcr from the latest master (573fff9a51ef1f1354d70de0e7253ff1d4bc91be). I've created a small gist with a simple script here: https://gist.github.com/clupprich/d9f9dece626508028ae9."}}