App automated check unexpexted url

Hi
im using shopify-express-js for my development. When i try to do the app automatic check in app publishing view i receive

During an automated check, your app didn’t successfully initiate authentication when installing. The app responded with an unexepcted URL. Learn more about installation requirements.

Expected URL: https://admin.shopify.com/store/uvszh1-m5/app/grant

Actual URL: https://amusing-optimum-eft.ngrok-free.app/?hmac=7a0666f8799c476b641d05274ccff6d1184ab1d86945c0332228a4eb069a7d15&host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvdXZzemgxLW01&shop=uvszh1-m5.myshopify.com&timestamp=1752512773

but as far as i know, the first url need to given by the shopify side. Im using legacy_installation_process and this is embeded app. here is the code i used in the app (this is same as sample code given by shopify in the github repo)

app.get("/auth", shopify_my_app.auth.begin())

app.get("/auth/callback", shopify_my_app.auth.callback(), authCallback, shopify_my_app.redirectToShopifyOrAppRoot())

btw, when i try this app installing in my testing store, its working fine.

Thanks

Hi @wisnshaftler

Since it’s an embedded app, after authentication, your app should redirect to the embedded app URL inside the Shopify admin, which looks like: https://admin.shopify.com/store/{shop}/apps/{your-app}.

1 Like

my code have this redirection. but the url asking


somthing like this. i think this is before the installation. like the grant URL. but as far as i know this redirection is doing by shopify. not by the server side. so how can i fix this?

Hello could you solve this problem I’m facin exactly the same problem and it’s weird because It was working fine some days ago

1 Like

Hello Liam

I’m facing the same problem I added redirect inside auth/callback to that url but is not working in fact is like my server is never reached

1 Like

I just redirect to the view page with the query parameters (get paramets) that /exitiframe got

something like


app.get('/exitiframe', shopify.ensureInstalledOnShop(), (req, res) => {
    res.redirect(`/dash.html?` + new URLSearchParams(req.query).toString());

});

it worked

btw the issue was i tried the ngrok url, but when i try the my app domain url (its something like mybeaufifulapp.com) it worked without needing that exitiframe issue

Hello Is still not working in my case, could you help me, could you send me DM please I can’t send you DM because your profile is private

I dont know how to send dm. My email

wisnshaftler@gmail.com