App embed deep link stopped working

Fixed it for me, thank you Liam!

Thank you! Works great again :+1:

Is this s a roll-back or a roll-forward situation? My admin-links seems have broken due to a change on the Shopify side, on Saturday (yesterday).

My SPA app (embedded with CDN app-bridge.js) has a few admin links, which when triggered correctly loads the right page, but for some reason something triggers load of the app front page after like 1 second.

Also this does not happen the first (1 or 2) few times, but then fails, this seems to indicate some kind of cached/stateful behaviour on the Shopify side.

Hi there,

@Liam-Shopify , this seems to be still failing with app embed blocks. It fails using both the deprecated uuid and the recommended api_key.

Please could you take a look?

Hi,

indeed, it is currently failing for both app blocks and app embed blocks. Is anybody else suffering this problem?

Kind regards

1 Like

@ sinuhe
I’m facing the same issue. Are you still experiencing it, or have you found any solution?

Hi, I just saw that the problem is in how Shopify translates the ā€œcurrentā€ theme (this ā€œcurrentā€ word is there if you follow the Shopify documentation: https://admin/themes/current/editor?context=apps&template=${template}&activateAppId={api_key}/{handle}).

It seems that for some cases, when Shopify translates the deep link to the final url, they are translating that ā€œcurrentā€ to a theme id that is not the published one…

If you are lucky and you save the published theme id on your side, you can patch it replacing ā€œcurrentā€ by the theme id (like https://admin/themes/123456789/editor?context=apps&template=${template}&activateAppId={api_key}/{handle}). Or at least you can request it with GraphQL before generating the deep link.

Anyway, this clearly seems a bug on Shopify’s side… please Shopify, could you take a look?

Hey, @Liam-Shopify! It still does not work properly. We’re implementing a theme app extension with auto-insertion using the documented format: Shopify Dev Docs – App Block URL format

The format we’re using is:

https://<myshopifyDomain>/admin/themes/current/editor?template=product&addAppBlockId={api_key}/{handle}&target=newAppsSection

Here’s an example link from our dev store (I replaced the actual API key with XXXXX):

https://admin.shopify.com/store/shortcodesdev/themes/123198898246/editor?template=product&addAppBlockId=XXXXX/easysearch-ft-widget&target=newAppsSection

When we click the link:

  • It does open the Theme Editor on the correct template (product).
  • The app block gets added, but not the one with the specified handle.
  • Instead, it inserts the first app block from the list, NOT the one we passed in the URL (easysearch-ft-widget in this case).

We double-checked: the api_key and handle are substituted correctly (see attached screenshots).

So it seems it takes last app block from the last installed app, not the one we passed!

Could you please help us understand:

  1. Why is the block being inserted incorrectly?
  2. Is there a known issue with addAppBlockId not respecting the passed API key and handle?
  3. Any workaround to reliably insert the correct app block?

For now we reverted back to uuid and it works perfectly, but I’m concerned how long we could use uuid as it’s now deprecated.

3 Likes

Hi, we still have the same problem with both uuid and api_key, it is completely random: sometimes it adds the right app block, sometimes it adds the first app block in the list, not the one defined by the uuid or api_key.

@Liam-Shopify, this bug is happening since several days and reported by several users in this post, could you please take a look or at least give us any updates?

1 Like

Hey folks - thanks for flagging. It does look like there could be a regression here. Connecting with the team on this now.

2 Likes

We’re encountering a similar issue which I think is related:

  • we are deep linking using the recommended {api_key} URL
  • we have 3 environments each with its own app block: dev, staging and production

However, what happens in practice is that the blocks get mixed up between environments (adding staging when deep linking from dev, adding production when deep linking from staging etc.)

I’m pretty sure there’s still an active bug in how the deep link works…

2 Likes

Having the same issue