0

嘿,我正在使用“shopify_app”gem,安装 Shopify 应用程序后遇到了一些问题。当回调 URL 重定向到 root 时,它会在屏幕上显示此消息。我发布 gem 文件、omniauth.rb、shopify_app.rb 和控制台日志,所以任何人都可以帮助我解决这个问题?

在此处输入图像描述

App_url : http://ee157468.ngrok.io/login
Whitelisted redirection URL(s) : http://ee157468.ngrok.io/auth/shopify/callback

宝石文件:

Ruby '2.3.1'

gem 'rails', '4.2.6'
gem 'shopify_app', '~> 7.2.0'
gem 'shopify_api', github: 'Shopify/shopify_api', ref: 'd097cbf8ba796c1c4de0d56446eb6dcc81acb70d'
gem 'omniauth-shopify-oauth2', '1.1.11'

全域认证.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :shopify,
    ShopifyApp.configuration.api_key,
    ShopifyApp.configuration.secret,
    scope: ShopifyApp.configuration.scope

end

shopify_app.rb

ShopifyApp.configure do |config|
  config.application_name = 'Billing Demo App'
  config.api_key = "2c60d7e17aa3632317ccc04bd0******"
  config.secret = "5356ea75128acca640e683e072******"
  config.scope = "read_orders, read_products"
  config.embedded_app = true
end

日志:

Started GET "/auth/shopify?shop=ronakabhattrz.myshopify.com" for 14.195.237.82 at 2017-10-02 18:12:00 +0530
Started GET "/auth/shopify?shop=ronakabhattrz.myshopify.com" for 14.195.237.82 at 2017-10-02 18:12:00 +0530
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
I, [2017-10-02T18:12:00.729352 #22582]  INFO -- omniauth: (shopify) Setup endpoint detected, running now.
I, [2017-10-02T18:12:00.729542 #22582]  INFO -- omniauth: (shopify) Request phase initiated.




Started GET "/auth/shopify/callback?code=98d1902a4f2ef624679715f957671523&hmac=854b1e36999519578073c2b2cc0677d4010b4db66b727efb321d4eff3aaf76b9&shop=ronakabhattrz.myshopify.com&state=975e96a3aff3e4824d33b91bfdd61b705007efbf346cc7bd&timestamp=1506948122" for 14.195.237.82 at 2017-10-02 18:12:02 +0530
Started GET "/auth/shopify/callback?code=98d1902a4f2ef624679715f957671523&hmac=854b1e36999519578073c2b2cc0677d4010b4db66b727efb321d4eff3aaf76b9&shop=ronakabhattrz.myshopify.com&state=975e96a3aff3e4824d33b91bfdd61b705007efbf346cc7bd&timestamp=1506948122" for 14.195.237.82 at 2017-10-02 18:12:02 +0530
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
I, [2017-10-02T18:12:02.804660 #22582]  INFO -- omniauth: (shopify) Setup endpoint detected, running now.
I, [2017-10-02T18:12:02.804829 #22582]  INFO -- omniauth: (shopify) Callback phase initiated.
Processing by ShopifyApp::SessionsController#callback as HTML
Processing by ShopifyApp::SessionsController#callback as HTML
  Parameters: {"code"=>"98d1902a4f2ef624679715f957671523", "hmac"=>"854b1e36999519578073c2b2cc0677d4010b4db66b727efb321d4eff3aaf76b9", "shop"=>"ronakabhattrz.myshopify.com", "state"=>"975e96a3aff3e4824d33b91bfdd61b705007efbf346cc7bd", "timestamp"=>"1506948122"}
  Parameters: {"code"=>"98d1902a4f2ef624679715f957671523", "hmac"=>"854b1e36999519578073c2b2cc0677d4010b4db66b727efb321d4eff3aaf76b9", "shop"=>"ronakabhattrz.myshopify.com", "state"=>"975e96a3aff3e4824d33b91bfdd61b705007efbf346cc7bd", "timestamp"=>"1506948122"}
Redirected to http://ee157468.ngrok.io/
Redirected to http://ee157468.ngrok.io/
Completed 302 Found in 5ms (ActiveRecord: 0.0ms)
Completed 302 Found in 5ms (ActiveRecord: 0.0ms)




Started GET "/" for 14.195.237.82 at 2017-10-02 18:12:06 +0530
Started GET "/" for 14.195.237.82 at 2017-10-02 18:12:06 +0530
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.237.82! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by HomeController#index as HTML
Processing by HomeController#index as HTML
  Rendered home/index.html.erb within layouts/embedded_app (227.6ms)
  Rendered home/index.html.erb within layouts/embedded_app (227.6ms)
  Rendered layouts/_flash_messages.html.erb (0.9ms)
  Rendered layouts/_flash_messages.html.erb (0.9ms)
Completed 200 OK in 2703ms (Views: 2701.6ms | ActiveRecord: 0.0ms)
Completed 200 OK in 2703ms (Views: 2701.6ms | ActiveRecord: 0.0ms)




Started GET "/" for 14.195.232.206 at 2017-10-02 18:13:54 +0530
Started GET "/" for 14.195.232.206 at 2017-10-02 18:13:54 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by HomeController#index as HTML
Processing by HomeController#index as HTML
  Rendered home/index.html.erb within layouts/embedded_app (1.9ms)
  Rendered home/index.html.erb within layouts/embedded_app (1.9ms)
  Rendered layouts/_flash_messages.html.erb (0.5ms)
  Rendered layouts/_flash_messages.html.erb (0.5ms)
Completed 200 OK in 49ms (Views: 48.1ms | ActiveRecord: 0.0ms)
Completed 200 OK in 49ms (Views: 48.1ms | ActiveRecord: 0.0ms)




Started GET "/assets/bootstrap_and_overrides.self-b85ec57930a7e57658a355f494c8fca5e2691f1a1ed6bfd67ddfbf962e55a7ac.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/bootstrap_and_overrides.self-b85ec57930a7e57658a355f494c8fca5e2691f1a1ed6bfd67ddfbf962e55a7ac.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/application.self-90acb5ab352deb11de7adfad09d709e43e33297bae37d97defcc0294cd6799d1.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/application.self-90acb5ab352deb11de7adfad09d709e43e33297bae37d97defcc0294cd6799d1.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/new.self-efcb7c5cbaf053c7bfeda8b5bde76b8a9d01200a8713fa6eb4bb6f4d801f2a3c.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/new.self-efcb7c5cbaf053c7bfeda8b5bde76b8a9d01200a8713fa6eb4bb6f4d801f2a3c.css?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/jquery_ujs.self-784a997f6726036b1993eb2217c9cb558e1cbb801c6da88105588c56f13b466a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/jquery_ujs.self-784a997f6726036b1993eb2217c9cb558e1cbb801c6da88105588c56f13b466a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/transition.self-09ff30b1e8a93d1f7728b9855f55d9c9d8d5734c8861e0d8139994e50944572a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Started GET "/assets/twitter/bootstrap/transition.self-09ff30b1e8a93d1f7728b9855f55d9c9d8d5734c8861e0d8139994e50944572a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:55 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/alert.self-a29e91e8cd3ddaba9bbc466901d53ec2127e9256b9b941905d525a3a716bd1a5.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:56 +0530
Started GET "/assets/twitter/bootstrap/alert.self-a29e91e8cd3ddaba9bbc466901d53ec2127e9256b9b941905d525a3a716bd1a5.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:56 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/modal.self-72f95ffa1071297725a9ac91989693d56d1abf23f441a47455073b0da2857a5b.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:56 +0530
Started GET "/assets/twitter/bootstrap/modal.self-72f95ffa1071297725a9ac91989693d56d1abf23f441a47455073b0da2857a5b.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:56 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/dropdown.self-9314126777c6be5443e37ea7f7967d7914d72b3e60449ba50edc967446373059.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:57 +0530
Started GET "/assets/twitter/bootstrap/dropdown.self-9314126777c6be5443e37ea7f7967d7914d72b3e60449ba50edc967446373059.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:57 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/scrollspy.self-a155b9d4b2f978905f0326c0f6635e1134fe91c6bfbfcbad079fa24a9fef2b0e.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:57 +0530
Started GET "/assets/twitter/bootstrap/scrollspy.self-a155b9d4b2f978905f0326c0f6635e1134fe91c6bfbfcbad079fa24a9fef2b0e.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:57 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/tab.self-122235057fbd4c6c7da377d59dc58f47b44cb1088a2e38e6ee6ce9d8ac29a26a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:58 +0530
Started GET "/assets/twitter/bootstrap/tab.self-122235057fbd4c6c7da377d59dc58f47b44cb1088a2e38e6ee6ce9d8ac29a26a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:58 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/tooltip.self-11cf547be953f25f511cec668f6690473fd97b2f65502e4032f4030999a3f0c3.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:58 +0530
Started GET "/assets/twitter/bootstrap/tooltip.self-11cf547be953f25f511cec668f6690473fd97b2f65502e4032f4030999a3f0c3.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:58 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/popover.self-77d8e3a2499c1104ef146396a68b82469ee2bdb365199b874694698d10405e9a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Started GET "/assets/twitter/bootstrap/popover.self-77d8e3a2499c1104ef146396a68b82469ee2bdb365199b874694698d10405e9a.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/button.self-a6cb16785434acb365ae426aef9f1fce05ed553cae7a965e4471c3da71509175.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Started GET "/assets/twitter/bootstrap/button.self-a6cb16785434acb365ae426aef9f1fce05ed553cae7a965e4471c3da71509175.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/collapse.self-7dc8bfbc2fbfabd2bad62c58ff8ffeaf8f20fb87c7ca6cd35f06d4dc19632587.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Started GET "/assets/twitter/bootstrap/collapse.self-7dc8bfbc2fbfabd2bad62c58ff8ffeaf8f20fb87c7ca6cd35f06d4dc19632587.js?body=1" for 14.195.232.206 at 2017-10-02 18:13:59 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/carousel.self-57eb8422043cf0a85b7a9dc6843916eb0a3e35b419c7798a5eb254b918997631.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Started GET "/assets/twitter/bootstrap/carousel.self-57eb8422043cf0a85b7a9dc6843916eb0a3e35b419c7798a5eb254b918997631.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap/affix.self-d2b642d8fbfc1d7041e2edefd66683ada567a980789dcd6f94fddda0b33408b5.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Started GET "/assets/twitter/bootstrap/affix.self-d2b642d8fbfc1d7041e2edefd66683ada567a980789dcd6f94fddda0b33408b5.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twitter/bootstrap.self-fbfa5ad7d9aa0afe439ec4ff3883acc4cb92b62cb67c40d674320c9aa1d4642d.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Started GET "/assets/twitter/bootstrap.self-fbfa5ad7d9aa0afe439ec4ff3883acc4cb92b62cb67c40d674320c9aa1d4642d.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:00 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/turbolinks.self-1d1fddf91adc38ac2045c51f0a3e05ca97d07d24d15a4dcbf705009106489e69.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Started GET "/assets/turbolinks.self-1d1fddf91adc38ac2045c51f0a3e05ca97d07d24d15a4dcbf705009106489e69.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/twine.self-c501348f82ab0fd443ed76d0516f9450097e1c59256d0411635e7bce77156487.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Started GET "/assets/twine.self-c501348f82ab0fd443ed76d0516f9450097e1c59256d0411635e7bce77156487.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255




Started GET "/assets/application.self-883280b551047d46b431b2f3a79b4d5b7ecd1ca521ddb4915db3075f69abe9e6.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Started GET "/assets/application.self-883280b551047d46b431b2f3a79b4d5b7ecd1ca521ddb4915db3075f69abe9e6.js?body=1" for 14.195.232.206 at 2017-10-02 18:14:01 +0530
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Cannot render console from 14.195.232.206! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

嘿,我正在使用“shopify_app”gem,安装 Shopify 应用程序后遇到了一些问题。当回调 URL 重定向到 root 时,它会在屏幕上显示此消息。我发布 gem 文件、omniauth.rb、shopify_app.rb 和控制台日志,所以任何人都可以帮助我解决这个问题?

4

0 回答 0