Embedded app TitleBar links are wrong when app URL is visited directly (not through admin > Apps)

Strange bug that seems to be new behavior.

If I visit my app directly, e.g. https://myapp.com, App Bridge React will redirect to the embedded app in Shopify admin (with the forceRedirect setting). All good there. App bridge redirects to /admin/apps/{api-key}

Now when the app finally loads the TitleBar component, all the links in the navigation bar are for example "/admin/apps/{api-key}/admin/apps/{app-handle}/path

There is an extra “admin/apps/{api-key}” in there.

See DOM element inspected:

I’m running the latest version of everything:

Polaris 4.12.0

App Bridge 1.15.0

App Bridge React 1.15.0

Having the same issue. Everything was working fine yesterday and today I am getting 404 with an additional/admin/apps/ getting added in the urs from somewhere.

Team Shopify please look into this.. Many people are having this issue and I can see it in several threads.

This is still a problem.

Just wanted to confirm that this doesn’t have to happen with a redirect, it is an issue any time the api key is used as opposed to the app handle.

Please fix asap!

Can confirm. Thanks for raising this issue. Aside - will the app-bridge github repos become public in the future? It would be nice to collect these reports over there.

Repro:

  1. Install app
  2. After auth flow, app successfully loads whitelisted redirect inside admin iframe
  3. Click navigation bar link
  4. 404

In addition there’s a related issue where tags injected into the apps aren’t rendered. (a la next.js)

Repro:

  1. Click admin apps link
  2. Click on app
  3. Load (style may be missing here but I don’t have any injected styles on this page)
  4. Click a navigation bar link to a page with injected
  5. Components render unstyled
  6. Press F5 once
  7. Components render styled

Can confirm this was working prior.

Agreed, having a Github repo for app bridge and other smaller packages like route-propagator would be great. I don’t understand why they are all in the “Quilt” repo - I would think that’s a management nightmare. Forum posts get lost in the wind, I’d feel much more confident if I could file a Github issue.

As a workaround right now I subscribe to the Redirect.ActionType.APP action in componentDidMount and modify the path appropriately if it contains “admin/apps/…”, before dispatching to this.props.history.push (where react-router takes it from there)

Thanks for the suggestion, @Jeff-Blake . I’ve implemented the same workaround for now. It’s not a complete fix as the active link state (underline) doesn’t work (I’m assuming because the paths don’t match), but it’s a whole lot better than a 404 page.

Further to the GitHub issues conversation, does anyone at Shopify even know about this problem? I don’t see anything related to this in the “Quilt” repo.

Hi all,

Thanks for reporting this issue, we’re working on a fix.

This issue should be fixed now. Thank you for your patience.

2 Likes

Confirmed that this has been fixed for me. I’ve been able to remove the work around.

Thanks, @Trish_Ta , for getting this fixed on a weekend!

I can confirm that the issue has been resolved for me :slight_smile: Thanks!

Indeed fixed, thanks!