How can I identify the current store in a Rails app after updating Shopify app?

How can I identify the current store in a Rails app after updating Shopify app?

mat_ory
Shopify Partner
9 0 1

Hello

 

I am updating my Shopify, non-embedded, Ruby on Rails app:

Updating gem shopify_app from 18.0.2 to 21.10.0

This includes updating the gem shopify_api from 9.5.1 to 13.4.0

(A lot of changes in there, especially the version 10 of shopify_api)

 

When stores are using my app (on the app UI), I need to know who they are (to show their products and data in the app)

 

Previously, in an "AuthenticatedController" I included "include ShopifyApp::Authenticated"

and was able to do session[:shop_id] to get the id (my database's ID) of the Shopify shop that's currently logged in / using the app.
 
This does not work anymore and I can't find a way to get the ID of the shop currently using the app. I tried many things including 
include ShopifyApp::EnsureInstalled + installed_shop_session (to get the domain of the shop using the app).
It keeps sending the user to the "install app page" (where you enter the Shopify domain).

I see this message in my terminal every time I go to a new app page:

[ ShopifyApp | INFO | Shop Not Found ] Could not identify installed store from current_shopify_domain
And redirects to the Shopify "Shopify App - Installation" page, asking me to enter a Shopify domain

 

So it's as if the app is not storing the sessions anymore? I am wrong?
 
Any help or suggestion would be highly appreciated!

 

Reply 1 (1)

mat_ory
Shopify Partner
9 0 1

I see this message in my terminal every time I go to a new app page:

[ ShopifyApp | INFO | Shop Not Found ] Could not identify installed store from current_shopify_domain
And redirects to the Shopify "Shopify App - Installation" page, asking me to enter a Shopify domain