I’ve made few updates to a Shopify app running on Ruby/Rails, updates were simply new release updated made and logic + code adjusted. Everything works when it comes to deployment of the app with new version and modes but if we try to access any home_controller, or any other controller / view it comes up with error page we set and in logs shows the following;
I,[2024-03-13T17:56:17.131281 #2] INFO -- : [ ShopifyApp | INFO | Shop Not Found ] Installed store - test-rssfeed.myshopify.com deduced from user session 2024-03-13T17:56:17.131732+00:00 app[web.1]:
F, [2024-03-13T17:56:17.131699 #2] FATAL -- : [0d99f118-4eae-4061-8121-cec1bcab1c45] 2024-03-13T17:56:17.131734+00:00 app[web.1]:
[0d99f118-4eae-4061-8121-cec1bcab1c45] TypeError (Passed `nil` into T.must): 2024-03-13T17:56:17.131735+00:00 app[web.1]:
[0d99f118-4eae-4061-8121-cec1bcab1c45] 2024-03-13T17:56:17.131748+00:00 app[web.1]:
[0d99f118-4eae-4061-8121-cec1bcab1c45] sorbet-runtime (0.5.11292) lib/types/_types.rb:222:in `must' 2024-03-13T17:56:17.131749+00:00 app[web.1]:
[0d99f118-4eae-4061-8121-cec1bcab1c45] shopify_api (14.0.1) lib/shopify_api/context.rb:173:in `host_scheme' 2024-03-13T17:56:17.131750+00:00 app[web.1]:
[0d99f118-4eae-4061-8121-cec1bcab1c45] sorbet-runtime (0.5.11292) lib/types/private/methods/call_validation_2_7.rb:59:in `bind_call'
I’d do more troubleshooting but I’m not sure where to even begin looking for Nil that is being passed into T.must
Tried different version of Ruby, tried removing Sorbet or updating it as well.
2
Answers
I faced the same problem. After adding HOST variable in .env file. It is working fine for me. Host is app url.
I upgraded
shopify_app
gem from17.1.1
to14.6.0
and got similar error.I fixed by adding
host
address atconfig/initializers/shopify_app.rb
Here sample configuration: