Shopify Remix Embedded App Loading Twice on Initial Open (Different Timestamps)

My Shopify embedded app makes two separate document requests to the same route (/app) when opened from the Shopify Admin, with timestamps 6-7 seconds apart. Both requests:

  • Have embedded=1 in the URL

  • Have valid, but different id_token values

  • Have different hmac and timestamp values

  • Return HTTP 200 (successful page load)

  • Are initiated by Shopify Admin (not my app code)

Example Network Requests:

1st: /app?embedded=1&…&timestamp=1763321204
2nd: /app?embedded=1&…&timestamp=1763321211 (7 seconds later)

Both requests hit my Remix loader, run authentication, database queries, and return the same HTML. This doubles my initial load time and impacts LCP (Largest Contentful Paint).

What i have tested:

:white_check_mark: Not caused by auth strategy - Tested both unstable_newEmbeddedAuthStrategy: false and true

:white_check_mark: Not caused by my redirect logic - No redirects in my code trigger this

:white_check_mark: Server logs confirm - Two separate loader executions with different timestamps

Hi @Shaikh_Ahmad

Thanks for flagging this - will dig into this issue on my side. For context, what are you currently using to measure LCP other than the native measurements in the partner dashboard.

Thanks for responding, but i have fixed the issue it was due to bug in my app logic.