Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledHTTPRequestError for geckodriver-v0.29.0-linux64.tar.gz #204

Closed
jankeesvw opened this issue Jan 29, 2021 · 4 comments
Closed

UnhandledHTTPRequestError for geckodriver-v0.29.0-linux64.tar.gz #204

jankeesvw opened this issue Jan 29, 2021 · 4 comments

Comments

@jankeesvw
Copy link

jankeesvw commented Jan 29, 2021

Summary

When I'm running our test suite on GitHub actions VCR halts with this error:

VCR::Errors::UnhandledHTTPRequestError:


  ================================================================================
  An HTTP request has been made that VCR does not know how to handle:
    GET https://github-releases.githubusercontent.com/25354393/37547e00-5662-***eb-95f2-d6546c8***4ac9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A/202***0***28/us-east-***/s3/aws4_request&X-Amz-Date=202***0***28T202626Z&X-Amz-Expires=300&X-Amz-Signature=0c06866d2aeee4f***3***ae8***38ac55322d***995cd3***9***aaff44b6489bcd782ac66e&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=25354393&response-content-disposition=attachment%3B%20filename=geckodriver-v0.29.0-linux64.tar.gz&response-content-type=application/octet-stream

Debug Info

Please provide the following information for bug reports:

  • webdrivers (4.5.0)
  • ruby 2.6.6p146
  • On GitHub Actions

Expected Behavior

I would expect the tests to pass.

Currently applied patch:

driver_hosts = Webdrivers::Common.subclasses.map { |driver| URI(driver.base_url).host }
driver_hosts += ["github-releases.githubusercontent.com"] # this is added
VCR.configure { |config| config.ignore_hosts(*driver_hosts) }

driver_urls = Webdrivers::Common.subclasses.map(&:base_url)
WebMock.disable_net_connect!(allow_localhost: true, allow: driver_urls)

I would love to patch this myself, can anyone tell me where to provide this URL?

I suspect it's here:

def base_url
'https://github.com/mozilla/geckodriver/releases'
end

@titusfortner
Copy link
Owner

I think you're just getting a redirect from: https://github.com/mozilla/geckodriver/releases/download/v0.29.0/geckodriver-v0.29.0-linux64.tar.gz

You can turn on logging Webdrivers.logger.level = :debug and it should output exactly which network calls are getting made.

@jankeesvw
Copy link
Author

That sounds very plausible. Should your gem accommodate for this behavior?

@kapoorlakshya
Copy link
Collaborator

@jankeesvw I don't think supporting WebMock is within the direct scope of this project, so we would appreciate it if you could update the Wiki page with your patch: https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock (should be publicly editable)

@jankeesvw
Copy link
Author

@jankeesvw I don't think supporting WebMock is within the direct scope of this project, so we would appreciate it if you could update the Wiki page with your patch: https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock (should be publicly editable)

I will, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants