oauth2: Faraday::RackBuilder::StackLocked: can't modify middleware stack after making a request
I’m using oauth2 in a sidekiq worker. Faraday 0.9.0, oauth2 from master. The first time it runs I get this error:
Faraday::RackBuilder::StackLocked
20:50:58 workers.1 | 2014-05-07T18:50:58Z 60220 TID-ouufoa6is WARN: can't modify middleware stack after making a request
20:50:58 workers.1 | 2014-05-07T18:50:58Z 60220 TID-ouufoa6is WARN: /Users/kain/.rvm/gems/ruby-2.1.1/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:199:in `raise_if_locked'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:86:in `use'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:203:in `use_symbol'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:96:in `response'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/oauth2-cd8a62e69cab/lib/oauth2/client.rb:89:in `request'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/oauth2-cd8a62e69cab/lib/oauth2/access_token.rb:107:in `request'
20:50:58 workers.1 | /Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/oauth2-cd8a62e69cab/lib/oauth2/access_token.rb:114:in `get'
About this issue
- Original URL
- State: closed
- Created 13 years ago
- Comments: 16 (8 by maintainers)
Similar problem, it was
OAUTH_DEBUG=truesee https://github.com/intridea/oauth2/issues/189Within a week, this issue will be closed so we can move forward with the 2.0.0 release, if there is no negative feedback.
@galois17 That makes sense! @lastgabs @syakovyn @masterkain Would you be able to try using the master branch to see if the issue is resolved? We’re still working toward a new major release.
@pboling, as far as I can see - the fix cd104e84485b6185f1cac49b2f4b6ae2520e670f was set to be added to the 1.5.0 milestone. And sure I do not see fixed
client.rbin v1.4.1. So, unsurprisingly, @lastgabs is still experiencing the issue.@lastgabs i removed from the faraday gem follow the line (https://github.com/lostisland/faraday/blob/master/lib/faraday/rack_builder.rb#L165) and it fix for me
@lastgabs It would probably be a good idea to move to a newer release of faraday. The gem says it is compatible with older versions of faraday, but that’s only because we don’t know that it is broken with them. Old versions of faraday may well be broken!