使用 OmniAuth 时出现 Nil 对象错误(通常有效)

发布于 2024-10-05 22:23:35 字数 543 浏览 0 评论 0原文

我在使用 Omniauth 时遇到奇怪的错误。这似乎与我的代码关系不大。

这是 Twitter 返回一些奇怪的变形物体的结果吗?

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

oa-oauth (0.1.6) lib/omniauth/strategies/oauth.rb:24:in `callback_phase'
oa-core (0.1.6) lib/omniauth/strategy.rb:27:in `call!'
oa-core (0.1.6) lib/omniauth/strategy.rb:19:in `call'
oa-core (0.1.6) lib/omniauth/builder.rb:30:in `call'
haml (3.0.24) lib/sass/plugin/rack.rb:41:in `call'

I am having a weird error when using Omniauth. This appears to have little to do with my code.

Is this the result of Twitter returning some weird deformed object?

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

oa-oauth (0.1.6) lib/omniauth/strategies/oauth.rb:24:in `callback_phase'
oa-core (0.1.6) lib/omniauth/strategy.rb:27:in `call!'
oa-core (0.1.6) lib/omniauth/strategy.rb:19:in `call'
oa-core (0.1.6) lib/omniauth/builder.rb:30:in `call'
haml (3.0.24) lib/sass/plugin/rack.rb:41:in `call'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

人│生佛魔见 2024-10-12 22:23:35

现在可以了。我高度怀疑这是Twitter的畸形回归。

It works now. I highly suspect that it is a deformed return by Twitter.

我的影子我的梦 2024-10-12 22:23:35

我有类似的问题。清除浏览器缓存解决了它。

懒惰型

I had a similar problem. clearing the browser cache solved it.

slothistype

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文