-
-
Notifications
You must be signed in to change notification settings - Fork 46
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: undefined method `id' for nil:NilClass "devise_masquerade_#{masqueraded_resource_name}_#{masqueradable_resource.id}_#{guid}".to_sym #140
Comments
Just started happening out of the blue for me as well |
@adamjleonard did you find a solution? |
@rodriguevara I did not |
Hi @adamjleonard and @rodriguevara have you tried to switch cache to session storage method?
|
Hi @oivoodoo , thanks for replying. Where should this code go? |
I don't remember Rails enough :0 but I believe in place where you have devise initializer. |
@oivoodoo That didnt help, but I noticed that the error occurs after a minute of staying in the view where I call the masquerade, let's say my users index. If a minute pass without me doing anything else, then when trying to masquerade, the error comes up. So maybe it has something to do with |
@rodriguevara it's the normal behaviour, you can increase the time but lets say if your admin went for coffee and keep the page opened with masquerade access, we need to make possible to skip ability to anyone to do the authentication. |
@oivoodoo yep, that makes sense, it would be helpful a rescue for that error, maybe redirecting to root_path or something like that |
@rodriguevara did this help you or you find the right solution? |
@umaimaz123 |
My solution:
|
Hi @remy727 . Could you add some notes why it would help? would it be possible to include as feature scenario / spec to the library your changes as enhancements? probably it would help the other developers as well. thank you! |
Hi guys, thanks for mantaining this gem! I'm getting this error:
sometimes when trying to log in. I'm using the
masquerade_path
method. It happens sometimes, and I couldn't find a 'pattern' so to speak. Most of the times works, but with some users this error comes up. Any ideas? Thanks a lot!The text was updated successfully, but these errors were encountered: