Heroku Shopify 应用程序在商店上安装后“您要查找的页面不存在。”

Heroku Shopify App after installation on shop “The page you were looking for doesn't exist.”

创建并部署新的 shopify 应用程序后 - 我已将其安装到我的商店,安装后它将我重定向到 home#index 页面,该页面在我的 routes.rb 中停留了几秒钟,然后切换到另一个页面404 - Not found.

页面

首次查看屏幕 2 秒:

404 - 未找到:

Heroku 应用日志:

2017-08-31T17:03:15.542454+00:00 app[web.1]: I, [2017-08-31T17:03:15.541990 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Started GET "/?hmac=37e4dde7daf5891a1ee93920cdcb02327c0b7f4a44b6d65c601ab08d565a5d49&shop=andreyka.myshopify.com&timestamp=1504198994" for 80.246.140.79 at 2017-08-31 17:03:15 +0000

2017-08-31T17:03:15.550387+00:00 app[web.1]: I, [2017-08-31T17:03:15.550211 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Processing by HomeController#index as HTML

2017-08-31T17:03:15.550397+00:00 app[web.1]: I, [2017-08-31T17:03:15.550346 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Parameters: {"hmac"=>"37e4dde7daf5891a1ee93920cdcb02327c0b7f4a44b6d65c601ab08d565a5d49", "shop"=>"andreyka.myshopify.com", "timestamp"=>"1504198994"}

2017-08-31T17:03:15.557075+00:00 app[web.1]: D, [2017-08-31T17:03:15.556973 #4] DEBUG -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] [1m[36mShop Load (0.9ms)[0m [1m[34mSELECT "shops".* FROM "shops" WHERE "shops"."id" = LIMIT [0m [["id", 1], ["LIMIT", 1]]

2017-08-31T17:03:15.987988+00:00 app[web.1]: I, [2017-08-31T17:03:15.987773 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Rendering home/index.html.erb within layouts/embedded_app

2017-08-31T17:03:15.988722+00:00 app[web.1]: I, [2017-08-31T17:03:15.988635 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Rendered home/index.html.erb within layouts/embedded_app (0.6ms)

2017-08-31T17:03:15.990684+00:00 app[web.1]: I, [2017-08-31T17:03:15.990595 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Rendered layouts/_flash_messages.html.erb (0.2ms)

2017-08-31T17:03:15.991334+00:00 app[web.1]: I, [2017-08-31T17:03:15.991244 #4] INFO -- : [b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9] Completed 200 OK in 441ms (Views: 5.4ms | ActiveRecord: 0.9ms)

2017-08-31T17:03:15.992454+00:00 heroku[router]: at=info method=GET path="/?hmac=37e4dde7daf5891a1ee93920cdcb02327c0b7f4a44b6d65c601ab08d565a5d49&shop=andreyka.myshopify.com&timestamp=1504198994" host=blackdiamonds.herokuapp.com request_id=b31d1ac2-53c8-4f1d-8c2a-89cb7817bdf9 fwd="80.246.140.79" dyno=web.1 connect=0ms service=459ms status=200 bytes=2738 protocol=https

config.assets.compile = true

您应该检查您的应用是否设置为 Shopify 中的嵌入式应用。

您可以转到 Shopify Partners website,单击您的应用,然后转到 "Extensions" 选项卡来执行此操作。如果设置正确,您应该会在 "Embed in Shopify Admin" 部分看到一个禁用按钮,如果不是,那么它会显示 "Enable" 并且应该只需要单击。