Shopify Admin Link Always Returning 500 Error

Hi everyone,

We’re facing an issue where admin links defined in our .toml file consistently return a 500 error when accessed. We found a similar discussion here, but even after applying the suggested fixes, the problem persists.

What we tried:

  1. Initially, we used "app://path" URLs, but they also resulted in a 500 error.
  2. To isolate the issue, we kept only one admin link in our extension config:
[[extensions]]
type = "admin_link"
name = "Test link"
handle = "test-product-link"

  [[extensions.targeting]]
  url = "app://products"
  target = "admin.product-details.action.link"

Despite this, the link still fails with a 500 error.
3. Our app is embedded, and admin links created via the Partner Dashboard work fine.
4. We are not running shopify app dev in another tab during deployment.

Here is a recent request that failed:
Request ID: bade7d8f-5612-4d4c-a342-285b59161611-1738343398

Has anyone encountered this issue or found a solution? Any insights would be greatly appreciated!

Thanks!

2 Likes

I am also having this exact problem. I used their migration and shopify app import-extensions documentation exactly, and it immediately started 500ing on all previously working admin links.

I am using relative urls like you are doing.

I also noticed that despite there being a ‘handle’ property, it’s generating it’s own slugified version of ‘name’ as the handle, and therefore I cannot have two different links in different places output the same text, for instance unable to add “Do something with AppName” on pages, and products.

This is really a blocker for us moving forward.

I got sidetracked from this issue for a while and didn’t actively look for a solution since it wasn’t critical for me. But I finally figured it out.

If you’re getting this exact error, the problem is likely related to having an active development process running for your app. When you run the dev command in the Shopify CLI, Shopify puts your app into development mode under the hood (probably only for the specified store, but still).

If you somehow interrupt this process without properly exiting (e.g., losing internet connection), your app will remain in development mode until you start it again and exit correctly.

In my case, this happened with a staging version of the app, which I don’t usually use for development. I didn’t even consider that it might have been stuck in this state for months. Restarting and properly exiting the dev session resolved the issue.

Also, Shopify’s App Bridge Admin links still have a lot of issues. If your app already has links created through the admin panel, I’d recommend not rushing to migrate them to the new format just yet.

Hope this helps!

1 Like

Thanks for sharing this @256_agent

1 Like