Inconsistant redirects with a non-embedded app

I have an issue with my non-embedded app not always being redirected correctly.

Everything is fine with the app installation.

If I visit the apps installed on my store and click on the Open app button on my app, I’m redirected to a URL similar to https://myshopname.myshopify.com/admin/api_permissions/xxxxxxxx/redirect, opening a new tab and redirecting me to my website.

My app requests the read/write scope on the translatable content. Because of these permissions, I guess Shopify adds a link in the edit menu of languages.

When I click on the app, I’m also redirected to the same URL (similar to https://myshopname.myshopify.com/admin/api_permissions/xxxxxxxx/redirect) but then the message "There’s no page at this address" is displayed instead of redirecting me correctly to my website.

Then when I’m on this error page, if I refresh the page, I’m redirected correctly to the website…

I don’t understand why the redirection behaviour is not the same and how I can fix it.

My app has been created manually from the Shopify website and the embedded app is disabled on it.

Thanks for your help.

Thibault

@Alex , do you have any idea regarding this issue?

Thanks

Can someone try to test this and let me know if it works on your end? That would be super nice :slightly_smiling_face:

  1. Create a new non-embedded app.
  2. Add multiple languages to your store.
  3. Install the app on your store with the scope read_translations,write_translation.
  4. Go back to your store languages (/admin/settings/languages).
  5. Click on the edit link next to one of your languages and then click on your app.
  6. You are redirected to /admin/api_permissions/xxxxxxxx/redirect and you can see the error message.
  7. If you refresh your page, you are redirected as expected.

I’m also having the same issue. I think it could be part of Shopify’s new app interface. When I access the app from certain locations it redirects as expected. From other locations it tries to open itself in the embedded apps iframe.
I’ve tried all the methods of redirect (httpredirect, js, meta, shopifys redirect js) but can’t get it to work.

I’m happy to read I’m not the only one facing this issue.

Unfortunately, I don’t have a solution or workaround at the moment.

I will post something here if I find something.

I found that whenever a link took the user to: https://{shop}.myshopify.com/admin/apps/{app-name} is when the app would be shown in an Iframe.

For me, I was redirecting to this as part of the App Charge redirect URL. I ended up putting my external URL in the redirect_url field and the users almost never end up going to the /admin/apps address.

Shopify support confirmed there is a regression with some redirections on apps using localization scope.

I find myself facing a similar issue and I am wondering what would be the expected behavior when trying to access https://{shop}.myshopify.com/admin/apps/{app-name} from a non-embedded app:

Should it redirect to the non-embedded app, try to show the non-embedded app inside an iframe or throw an error because you’re not supposed to use such a link for a non-embedded app?