Unlisted App Not Installing/Loading

Solved
Highlighted
Tourist
7 0 0

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!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 163

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.

1 Like
Highlighted
Tourist
7 0 0

@scottydont , 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!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 163

Thanks @mthdvd. I'm able to replicate.

 

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

1 Like
Highlighted
Shopify Staff
Shopify Staff
1040 139 163

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.

1 Like
Highlighted
Tourist
7 0 0

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, @scottydont!

0 Likes
Highlighted
Pathfinder
132 2 22

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

0 Likes
Highlighted
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

1 Like
Highlighted
Pathfinder
132 2 22

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.

0 Likes
Highlighted
Shopify Expert
29 0 20

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 ❖ The only 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
0 Likes