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

request_phase throwing 'string not matched' #4

Closed
divesnob opened this issue Apr 12, 2013 · 2 comments
Closed

request_phase throwing 'string not matched' #4

divesnob opened this issue Apr 12, 2013 · 2 comments

Comments

@divesnob
Copy link

In flickr.rb, calling 'super' in the 'request_phase' is failing at session['oauth'][name.to_s]

def request_phase
        request_token = consumer.get_request_token({:oauth_callback => callback_url}, options.request_params)
        session['oauth'] ||= {}
        session['oauth'][name.to_s] = {'callback_confirmed' => request_token.callback_confirmed?, 'request_token' => request_token.token, 'request_secret' => request_token.secret}

The error is 'string not matched' with a stack trace of

org/jruby/RubyString.java:3848:in `[]='
omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:31:in `request_phase'
omniauth-flickr (0.0.11) lib/omniauth/strategies/flickr.rb:73:in `request_phase'
omniauth (1.1.4) lib/omniauth/strategy.rb:214:in `request_call'

In flickr.rb, if you set session['oauth'] = {} before calling super, it appears to fix it. Not sure if this is the correct solution, but something appears broken.

This is being run in jRuby with the following versions in my Gemfile.lock

    omniauth (1.1.4)
      hashie (>= 1.2, < 3)
      rack
    omniauth-facebook (1.4.1)
      omniauth-oauth2 (~> 1.1.0)
    omniauth-flickr (0.0.11)
      omniauth-oauth (~> 1.0)
    omniauth-instagram (1.0.0)
      omniauth (~> 1.0)
      omniauth-oauth2 (~> 1.0)
    omniauth-oauth (1.0.1)
      oauth
      omniauth (~> 1.0)
    omniauth-oauth2 (1.1.1)
      oauth2 (~> 0.8.0)
      omniauth (~> 1.0)
    omniauth-twitter (0.0.14)
      multi_json (~> 1.3)
      omniauth-oauth (~> 1.0)
@timbreitkreutz
Copy link
Owner

It looks to me like session['oauth'] contains a string rather than a Hash. Any chance you could inspect it and see what's in there? Maybe an undecoded bit of JSON or other serialization of the oauth hash?

@timbreitkreutz
Copy link
Owner

I haven't been able to reproduce this--if anybody is still having this problem please open a new issue. Thanks for your input @divesnob

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

2 participants