Unlisted App Not Installing/Loading

Solved
mthdvd
Shopify Partner
17 0 1

I’ve recently made an unlisted Shopify app using the ruby on rails gem.

 

When I had initially set up, I was able to successfully install/uninstall the app.

Now, however, I am unable to load the app to a different development store or live store.

 

When I attempted to install the app to a client’s live store, I visited the url: https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}

 

I am directed to the appropriate installation prompt. After clicking “Install unlisted app”, I’m directed to https://myapp.heroku.com/login? where I am asked to “Enter shop domain to install”.

 

After doing so, all that happens is that I’m directed to https://myapp.heroku.com/login?top_level=true and the input field is reset.

 

My app dashboard does say that the app was installed, but when I go to the store and click on the app I am sent to httsp://myapp.heroku.com/login? and the process repeats. I can not actually access the app.

 

Incidentally, the same thing happens when I enter https://myapp.heroku.com/?auth/shop={mystore}

 

During the development of the app, I didn’t touch any of the files provided by the gem for authentication so I’m very confused while all of a sudden I’m having these issues.

 

Nothing in the server logs gives me any insight into why this is happening and I've gone over the oauth documentation several times to try and understand what I'm missing. I am a bit stuck and not sure how to proceed.

 

Thanks in advance for any help!

Accepted Solution (1)

Accepted Solutions
SBD_
Shopify Staff
Shopify Staff
1098 146 227

This is an accepted solution.

Thanks for the code @mthdvd.

 

It appears to be a config issue - setting `config.embedded_app` to false seems to resolve the issue. Let me know how it goes.

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 9 (9)
SBD_
Shopify Staff
Shopify Staff
1098 146 227

Hey @mthdvd,

 

Check the URLs you have the in Partner Dashboard > Your App > App Setup. There's also a breakdown of the OAuth flow here.

 

If you're still stuck, please let me know the App ID or URL.

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mthdvd
Shopify Partner
17 0 1

@SBD_ , thank you for your reply!

 

I believe the whitelisted URLs are correct. They have worked before when I installed previously. They have never been changed and throw a recognizable error when they do not work.

 

URLs

https://{appurl}/auth/shopify/callback

http://{appurl}/auth/shopify/callback

 

 

App ID: 3243723

 

Thanks again!

SBD_
Shopify Staff
Shopify Staff
1098 146 227

Thanks @mthdvd. I'm able to replicate.

 

The urls look good. Is it still working for you locally?

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

SBD_
Shopify Staff
Shopify Staff
1098 146 227

This is an accepted solution.

Thanks for the code @mthdvd.

 

It appears to be a config issue - setting `config.embedded_app` to false seems to resolve the issue. Let me know how it goes.

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

mthdvd
Shopify Partner
17 0 1

Thank you! That took care of the issue.

 

I guess this was happening since I installed the app from the direct url I mentioned above? Not quite sure I fully understand, but I'll do some more investigating if it starts to bug me too much.

 

Thanks again, @SBD_!

OliUK
Shopify Partner
232 2 48

Hi Scotty,

 

I'm in the same boat, setting `config.embedded_app` to false does work for me. However, my app is an embedded app, so your fix gives me new problems.

 

Do any other potential fixes come to mind?


Thanks,

 

Oli

seannik
Shopify Expert
2 0 1

Hi Oli,

Was having the same issues. Mine too is an embedded app (Rails 6 on heroku). This is what worked for me:

 

set `config.embedded_app` to false just to get the app installed. check that the Shop was correctly registered in the DB.

once installed set the `config.embedded_app` back to true and push to heroku

OliUK
Shopify Partner
232 2 48

Thanks Seannik. I bumped into a couple of problems like this along the way. A really handy strategy I found was to double-check my code with the current Shopify Rails app Git repo. Even in the 5 months since I started my development there were meaningful changes with the webhooks and callbacks controller.

Bogdan_Radu
Shopify Expert
34 0 23

check this https://community.shopify.com/c/Shopify-APIs-SDKs/App-doesn-t-load-in-iframe-on-firefox-safari/m-p/7...

Make more sales by sending discount links or apply discounts automatically based on what's in their shopping cart with ✌ Automatic Discount https://apps.shopify.com/automatic-discount-rules ❖ App that allows you to upsell add-ons and bundles without duplicate variants and without any coding needed ✌Ultimate Upsell https://apps.shopify.com/ultimate-upsell