Note that there are some explanatory texts on larger screens.

plurals
  1. POInfamous Nil Object Error w/ OmniAuth
    text
    copied!<p>You can see this error on SO:<br /> <a href="https://stackoverflow.com/questions/4366910/nil-object-error-when-using-omniauth-which-normally-works">Nil object error when using OmniAuth (which normally works)</a> <br/> <a href="https://stackoverflow.com/questions/4705495/omniauth-rails-you-have-a-nil-object-when-you-didnt-expect-it">OmniAuth / Rails - You have a nil object when you didn&#39;t expect it</a></p> <p>I have the same issue with my OmniAuth strategy. I've written my own, and have tested it both locally on Rails and Sinatra. Both instances return the same error, with Sinatra displaying more helpful information.</p> <p>"You have a nil object when you didn't expect it! <br/> You might have expected an instance of ActiveRecord::Base. <br/> The error occurred while evaluating nil.[]="</p> <p>It looks like there's some Rack stuff going on behind the scenes that I'm not understanding. Sinatra's last comment in the trace is:</p> <p>"../lib/rack/utils.rb in set_cookie_header!" at line 194:</p> <pre><code>case header["Set-Cookie"] </code></pre> <p>I'm not messing with cookies, though. It seems like this problem goes away randomly for certain people, or doing something simple as clearing the cache has worked for someone. None of those techniques have worked for me. Does anyone know a tried and true way for solving this issue? You can view the repo for the project here: <a href="https://github.com/stevenhaddox/oa-casport" rel="nofollow noreferrer">https://github.com/stevenhaddox/oa-casport</a> Thanks!</p> <p><strong>EDIT:</strong> After a lot of thought, I'm guessing OmniAuth doesn't like the fact that my Rack middleware is not configured for SSL. Is there a way to tell OmniAuth to not expect SSL?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload