Redirect after initial install results in 404

Highlighted
New Member
5 0 0

When I first install my app on a test store, I go through the auth process and then redirect the user to approve the subscription. This all works, but when I get redirected back to the Shopify admin page, I end up with a 404.

 

This screencast, shows the issue happening:

Desktop-2020-4-8-12-32-21.gif

 

The steps are:

1. In a development store go to: https://mydomain/auth?shop=testing-greenr.myshopify.com

2. This redirects to auth the app and approve the subscription

3. This then redirects to my website and then embeds the app but on the return I end up at this URL: /admin/apps/<api-key>/ which 404s.

4. I click 'Apps' and then click back on my app and go the app homepage with no issue.

 

So this error only seems to occur on first install, and it's currently stopping me getting approval for the app.

 

I followed the instructions here to build the app: https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react and I'm using all the latest Koa libraries.

 

Any help appreciated as I just can't get to the bottom of this.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 129

Hey @hmg23,

 

Is there anything in the console when you see the 404? If you're still having trouble, please provide an install link (you can DM me) and I can investigate further.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
5 0 0

I eventually got round this by looking for the charge_id on the url and then redirecting to the app page. I've noticed other people are having this issue so think it's a bug in shopify-koa-auth.

0 Likes