AdminPrintAction preview shows "Unable to display content" in the Shopify Mobile app (Android) works on desktop

An admin print action extension (admin.order-details.print-action.render) using <AdminPrintAction src={...}> renders and prints correctly in the desktop web admin, but in the Shopify Mobile app (Android) the preview never renders — native “Unable to display content” alert, and “Preview is loading” hangs forever. Happens whether src returns HTML or PDF.

Environment

  • Target: admin.order-details.print-action.render · Component: AdminPrintAction (@shopify/ui-extensions-react/admin)
  • Device: Samsung Galaxy A55 (SM-A556E), Android 16
  • Shopify Mobile app: Android 10.2625.0 (Build 291417, API 36)
  • In-app WebView: Chrome 149.0.7827.91 (“Android WebView”)
  • Full UA: …Chrome/149.0.7827.91 Mobile Safari/537.36 Shopify Mobile/Android/10.2625.0 (Build 291417 with API 36 on Samsung SM-A556E) polaris_uplift ExtensibilityHost MobileBridge MobileBridgeNext MobileOSENext

Repro

  1. Admin print action extension targeting admin.order-details.print-action.render.
  2. <AdminPrintAction src={src}> where src returns a trivial self-contained doc: <!DOCTYPE html><html><body><h1>Print test OK</h1></body></html>.
  3. Desktop admin → Print → renders :white_check_mark:
  4. Shopify Mobile app (Android) → Print → “Unable to display content”, “Preview is loading” hangs :cross_mark:
  5. Also tried src returning a valid application/pdf → same failure.

Network evidence (key detail)
Desktop loads src as an iframe. Mobile retrieves it via a single GET authenticatedFetch (no OPTIONS preflight):

GET <src>
sec-fetch-mode: cors
origin: https://admin.shopify.com
authorization: Bearer <session token>
x-requested-with: com.shopify.mobile

Server returns 200 with access-control-allow-origin: *. Confirmed both delivered successfully yet neither renders:

  • content-type: text/html → 200 → not rendered
  • content-type: application/pdf (valid PDF) → 200 → not rendered

Ruled out: not CORS/auth (200 + acao: * + valid token), no preflight, not heavy/malformed content (trivial <h1> and valid PDF both fail), action UI itself renders fine, identical code works on desktop.

question:
Is the Shopify Mobile app’s WebView remotely debuggable (e.g., via chrome://inspect / WebView.setWebContentsDebuggingEnabled), or is there any official way to inspect the console/network of an admin UI extension running inside the mobile app? chrome://inspect did not surface the app’s WebView, which made diagnosing this much harder — capturing the request server-side was the only option.

@Henry_Tao

Quick update with more data points:

The same AdminPrintAction + src renders fine in mobile Chrome (admin.shopify.com on Android) and in the POS app — it fails only in the native Shopify admin app. So it’s not the content, CORS, or format.

Server-side, the native app fetches src via authenticatedFetch and gets a clean 200 (access-control-allow-origin: *) for both text/html and a valid application/pdf — yet neither renders (“Unable to display content”).

Also: chrome://inspect exposes POS’s WebView but nothing for the admin app (com.shopify.mobile), and the Dev Console has no mobile preview for admin extensions — so the admin app’s print preview isn’t even inspectable.

Looks like a rendering issue specific to the native Shopify admin app.