Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

App Bridge 2.0 Redirects to 404 Page After Auth

Solved

App Bridge 2.0 Redirects to 404 Page After Auth

jt274
Shopify Partner
15 1 8

I am currently updating a functioning app to App Bridge 2.0. The problem I'm experiencing is that during the auth flow, Shopify now redirects to https://store.myshopify.com/apps/(LONG TEXT STRING)/?shop=store.myshopify.com

This leads to a 404 error page on the store front. The problem is that it is redirecting to /apps instead of /admin/apps. Does anyone know of a solution for this? It worked fine in App Bridge 1.x.

Accepted Solution (1)
jt274
Shopify Partner
15 1 8

This is an accepted solution.

Replies 6 (6)

Filljoy
Shopify Partner
211 10 67

Others are facing issues with 2.0, try the https://shopifypartners.slack.com/ channel and look in #appdev and #app-bridge channels. 

orloff
Shopify Partner
26 0 16

Same problem!

Look my post here

jt274
Shopify Partner
15 1 8

This is an accepted solution.

orloff
Shopify Partner
26 0 16

the solution is not obvious, rather than a solution, but common phrases that we have read many times, does this mean we need to do like this?

ctx.redirect(`/?host=${host}`)

ctx.redirect(`/?shop=${shop}?host=${host}`)

orloff
Shopify Partner
26 0 16
ctx.redirect(`/?shop=${shop}&host=${host}`);

don't works, lead to 404 Page

orloff
Shopify Partner
26 0 16

After remaking _app.js with getting host from props, redirect now works properly