Skip to content

Compatibility issues with older versions of Faraday #36

@Pontus4

Description

@Pontus4

Got this error when using twingly-http with old versions of the Faraday gems:

.gem/ruby/3.3.7/gems/twingly-http-0.8.0/lib/faraday/response_body_size_limit/middleware.rb:8:in `initialize': wrong number of arguments (given 2, expected 1; required keyword: max_size_bytes) (ArgumentError)
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/dependency_loader.rb:21:in `new'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/dependency_loader.rb:21:in `new'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:57:in `build'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:175:in `block in to_app'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:174:in `each'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:174:in `inject'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:174:in `to_app'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:167:in `app'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/rack_builder.rb:154:in `build_response'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/connection.rb:516:in `run_request'
	from /Users/pontus/.gem/ruby/3.3.7/gems/faraday-1.10.0/lib/faraday/connection.rb:200:in `get'
	from /Users/pontus/.gem/ruby/3.3.7/gems/twingly-http-0.8.0/lib/twingly/http.rb:125:in `http_get_response'
	from /Users/pontus/.gem/ruby/3.3.7/gems/twingly-http-0.8.0/lib/twingly/http.rb:103:in `http_response_for'
	from /Users/pontus/.gem/ruby/3.3.7/gems/twingly-http-0.8.0/lib/twingly/http.rb:63:in `get'
	from (irb):4:in `<main>'
	from <internal:kernel>:187:in `loop'

The installed versions were:

  * faraday (1.10.0)
  * faraday-em_http (1.0.0)
  * faraday-em_synchrony (1.0.0)
  * faraday-excon (1.1.0)
  * faraday-httpclient (1.0.1)
  * faraday-multipart (1.0.3)
  * faraday-net_http (1.0.1)
  * faraday-net_http_persistent (1.2.0)
  * faraday-patron (1.0.0)
  * faraday-rack (1.0.0)
  * faraday-retry (1.0.3)
  * faraday_middleware (1.0.0)

After running bundle update faraday it started working again.

I don't have time to investigate the exact versions required at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions