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
{{ message }}
Repository navigation
Faraday::ParsingError with json gem >= 3.0 (ArgumentError: wrong number of arguments) #113
When json >= 3.0 is resolved in the bundle (e.g. via a fresh bundle update/bundle lock), every API call that goes through Faraday's :json response middleware fails with:
ArgumentError: wrong number of arguments (given 2, expected 1)
wrapped as Faraday::ParsingError.
Steps to Reproduce
gem'json','3.0.2'require'strava-ruby-client'client=Strava::OAuth::Client.new(client_id: 'x',client_secret: 'y')client.oauth_token(refresh_token: 'z',grant_type: 'refresh_token')# => Faraday::ParsingError: wrong number of arguments (given 2, expected 1)
Expected Behavior
The client should work with json >= 3.0.
Actual Behavior
Any API response parsed via Faraday's JSON middleware raises Faraday::ParsingError wrapping ArgumentError: wrong number of arguments (given 2, expected 1).
Environment
strava-ruby-client 3.1.0
faraday 2.14.3
json 3.0.2
ruby 3.4.6 / 3.3.5
Possible Fix
This is arguably a Faraday bug (tracked upstream), but strava-ruby-client could work around it by:
Pinning json to < 3.0 in the gemspec, or
Configuring/patching the Faraday :json middleware to pass parser options as keyword arguments when running on json >= 3.0, or
Tracking/depending on a Faraday release once it supports json 3.x.
As a temporary workaround, downstream apps can pin gem 'json', '< 3.0' in their own Gemfile.
Resolved in #115. Faraday v2.14.4 includes JSON 3 support, passing parser options as keyword arguments. The client now requires Faraday >= 2.14.4, keeps Faraday's built-in :json response middleware, removes the temporary json 2.x development pin, and tests against both JSON 2 and JSON 3.
Activity
Add Appraisals to reproduce and track json 3.x incompatibility
Add Appraisals to reproduce and track json 3.x incompatibility
Add Appraisals to reproduce and track json 3.x incompatibility
Add Appraisals to reproduce and track json 3.x incompatibility
Fix json >= 3.0 compatibility (#113)
dblock commentedon Sep 17, 2026
Resolved in #115. Faraday v2.14.4 includes JSON 3 support, passing parser options as keyword arguments. The client now requires Faraday >= 2.14.4, keeps Faraday's built-in
:jsonresponse middleware, removes the temporaryjson2.x development pin, and tests against both JSON 2 and JSON 3.Posted by an AI on behalf of @dblock.