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

NoMethodError occurred in omniauth_callbacks#facebook #115

Open
jackkinsella opened this issue Jan 9, 2014 · 3 comments
Open

NoMethodError occurred in omniauth_callbacks#facebook #115

jackkinsella opened this issue Jan 9, 2014 · 3 comments

Comments

@jackkinsella
Copy link
Contributor

Receiving a sporadic exception (one per 30-50 Facebook authentications) in production using the Spree 2-0-stable stack.

URL: /users/auth/facebook/callback?code=CODE
BACKTRACE:
A NoMethodError occurred in omniauth_callbacks#facebook:

undefined method `user' for nil:NilClass
vendor/bundle/ruby/1.9.1/bundler/gems/spree_social-    3b9139eaf8f9/app/controllers/spree/omniauth_callbacks_controller.rb:42:in `facebook'

SESSION (leaving in only the keys that had values)


    data: {"_csrf_token"=>
    "access_token"=> ,
    "order_id"=> ,
    "spree_user_return_to"=>"/checkout/payment",
    "omniauth"=>
     {"provider"=>"facebook",
      "uid"=>,
      "info"=>
       {"nickname"=> 
        "name"=>
        "first_name"=>
        "last_name"=>
        "image"=>
        "description"=>
        "location"=>
        "verified"=>true},
      "credentials"=>
       {"token"=>
       ,
        "expires_at"=>,
        "expires"=>true}},
     "_turbolinks_redirect_to"=>
      "/user/spree_user/sign_up"}
@radar
Copy link
Contributor

radar commented Jan 10, 2014

Hi @jackkinsella,

This may be an issue when a user has a current order only, since that's where the stacktrace is pointing. We don't have a test for that at the moment in spree_social... could you try your hand at writing a regression test for this issue?

@jackkinsella
Copy link
Contributor Author

I took 15 minutes this morning but I couldn't even figure out where to start. With my deadlines crunching I have to pass on this one.

@radar
Copy link
Contributor

radar commented Feb 9, 2014

@jackkinsella Have you been able to figure this one out yet?

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

No branches or pull requests

3 participants