我正在尝试通过Facebook实现登录我的应用程序。一切在开发中都可以正常工作,但是对于生产,我不得不将应用程序升级到https,而当我进行生产时,一切都无法正常工作。
我不知道如何调试它,因为它已经投入生产。任何帮助将不胜感激。
这些是服务器日志:
2018-09-17T19:07:21.708757+00:00 app[web.1]: I, [2018-09-17T19:07:21.708637 #4] INFO -- : [c8077522-7674-46e5-97b8-c74456194630] Started GET "/users/auth/facebook" for 213.190.86.42 at 2018-09-17 19:07:21 +0000
2018-09-17T19:07:21.709189+00:00 app[web.1]: I, [2018-09-17T19:07:21.709128 #4] INFO -- omniauth: (facebook) Request phase initiated.
2018-09-17T19:07:22.442651+00:00 app[web.1]: I, [2018-09-17T19:07:22.442540 #4] INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Started GET "/users/auth/facebook/callback?code=AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M&state=f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09" for 213.190.86.42 at 2018-09-17 19:07:22 +0000
2018-09-17T19:07:22.443281+00:00 app[web.1]: I, [2018-09-17T19:07:22.443215 #4] INFO -- omniauth: (facebook) Callback phase initiated.
2018-09-17T19:07:22.958420+00:00 app[web.1]: I, [2018-09-17T19:07:22.958291 #4] INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Processing by Users::OmniauthCallbacksController#facebook as HTML
2018-09-17T19:07:22.963677+00:00 app[web.1]: I, [2018-09-17T19:07:22.962975 #4] INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Parameters: {"code"=>"AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M", "state"=>"f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09"}
2018-09-17T19:07:22.987503+00:00 app[web.1]: D, [2018-09-17T19:07:22.987389 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] User Load (3.9ms) SELECT "users".* FROM "users" WHERE "users"."provider" = $1 AND "users"."uid" = $2 LIMIT $3 [["provider", "facebook"], ["uid", "10156065770667984"], ["LIMIT", 1]]
2018-09-17T19:07:22.990121+00:00 app[web.1]: D, [2018-09-17T19:07:22.990015 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] (1.6ms) BEGIN
2018-09-17T19:07:22.997442+00:00 app[web.1]: D, [2018-09-17T19:07:22.997336 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] User Exists (2.1ms) SELECT 1 AS one FROM "users" WHERE "users"."username" = $1 AND "users"."id" != $2 LIMIT $3 [["username", "Listy"], ["id", 65], ["LIMIT", 1]]
2018-09-17T19:07:23.002441+00:00 app[web.1]: D, [2018-09-17T19:07:23.002365 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] User Update (2.9ms) UPDATE "users" SET "token" = $1, "token_expiry" = $2, "updated_at" = $3 WHERE "users"."id" = $4 [["token", "EAADxC9YDD2sBAKeTKx0Cgp86Dnm5l774a2vVsZBYwOTnl7TV9egMgBYjTtgY9lFHV6eW90V1KgRspbcHM3mKL92hKPO0fZAVbkNaWjdHzJ8TQiaRYJqZC3NnhNu6GOOr6eFtteA48XWhYXQslchLmFgUky1G50ZD"], ["token_expiry", "2018-11-16 19:07:22"], ["updated_at", "2018-09-17 19:07:22.997902"], ["id", 65]]
2018-09-17T19:07:23.055468+00:00 app[web.1]: D, [2018-09-17T19:07:23.055339 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] (6.5ms) COMMIT
2018-09-17T19:07:23.063263+00:00 app[web.1]: I, [2018-09-17T19:07:23.063174 #4] INFO -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] Completed 500 Internal Server Error in 99ms (Searchkick: 6.4ms | ActiveRecord: 19.1ms)
2018-09-17T19:07:23.064786+00:00 app[web.1]: F, [2018-09-17T19:07:23.064718 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]
2018-09-17T19:07:23.062638+00:00 app[web.1]: D, [2018-09-17T19:07:23.062529 #4] DEBUG -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] User Store (6.4ms) {"id":65,"exception":["NoMethodError","undefined method `connect_timeout=' for #\u003cTyphoeus::Request:0x000000000782ded8\u003e"],"exception_object":"undefined method `connect_timeout=' for #\u003cTyphoeus::Request:0x000000000782ded8\u003e"}
2018-09-17T19:07:23.065029+00:00 app[web.1]: F, [2018-09-17T19:07:23.064965 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] NoMethodError (undefined method `connect_timeout=' for #<Typhoeus::Request:0x000000000782ded8>):
2018-09-17T19:07:23.065153+00:00 app[web.1]: F, [2018-09-17T19:07:23.065087 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78]
2018-09-17T19:07:23.065246+00:00 app[web.1]: [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] app/controllers/users/omniauth_callbacks_controller.rb:3:in `facebook'
2018-09-17T19:07:23.065243+00:00 app[web.1]: F, [2018-09-17T19:07:23.065187 #4] FATAL -- : [3d25cc49-e2ec-4593-bf2f-d06d5595cd78] app/models/user.rb:76:in `find_for_facebook_oauth'
2018-09-17T19:07:23.067245+00:00 heroku[router]: at=info method=GET path= "/users/auth/facebook/callback?code= AQDCk0zcgI3_D0ZEuO5l6pWjAbhRgSelpfYcPB_f70hwffFdhs2MRp1rYd1fktORGUhqruLXbB40DXbbbx71zMHD2hH5UyndDQXbWpZ4gIoDuGVqO6IgFMwQuv0Jp_-PVQ2eokb_aW_ZfVY_LkIYPUWqy4fGihmWgd3S4cSlpo9zqV_0m9Ra4avOXQjw5a8VQEq2WNlIsun4J77x4EBzrOh_9xtVG582YV2pZy6tFE83QsvsmNkpBEzmWsV0bnGek94hbnbkpKRmImHfCLD5iyJ3HWZ3uQLG3FypdGZHjo8BtQ23Y2GeD5lnsyGlvqGRX4M&state=f58628a503514d6fd368e47a88f0f1c383e1dbe519b4ad09" host=www.listy.club request_id=3d25cc49-e2ec-4593-bf2f-d06d5595cd78 fwd="213.190.86.42" dyno=web.1 connect=0ms service=630ms status=500 bytes=1891 protocol=https
2018-09-17T19:08:50.249219+00:00 heroku[run.8341]: Process exited with status 0