My app stopped working starting with latest android POS update

My app is a non-embedded app that I use from my POS App, and when it attempts to authenticate, it gets stuck on the URL below, which I can see by connecting using chrome://inspect/#devices. My app still works fine with the Shopify app dev command, and the URL, if not inside the POS app, works fine. What changed with shopify that would cause it to stop working

https://#######.myshopify.com/admin/auth/login?redirect=%2Fadmin%2Foauth%2Fauthorize%3Fclient_id%#######%26scope%3Dcustomer_read_draft_orders%2Cread_customers%2Cread_inventory%2Cread_locations%2Cread_markets%2Cread_products%2Cwrite_draft_orders%26redirect_uri%3Dhttps%3A%2F%2Fpaste-terrorists-coated-primary.trycloudflare.com%2Fauth%2Fcallback%26state%3D488869580229908%26grant_options%3D

Hey @Shua_Tal :waving_hand: , thanks for reaching out. This does seem quite odd. I haven’t heard of any other reports of this behaviour, but I’m definitely happy to look into this with you. Would you be able to replicate the error and send some logs our way through the POS App itself? We have some steps below you can use to send those our way:

In the POS App Tap > More > Support > Report a bug. Then, just include my name “Alan_G” in the feedback form and I can pull those logs on my end here and investigate further.

Let me know once you’ve sent those our way and I can dig into this. Hope to hear from you soon and let me know if I can clarify anything further on my end here.

I sent the logs.

I also may have a solution using
const userAgent = request.headers.get(“user-agent”) || “”;
const isPOS = userAgent.includes(“Shopify POS”);
console.log(“app.tsx_loader”, { userAgent, isPOS });
if (!isPOS) {
await authenticate.admin(request);
}
Still trying to iron out.

Did something change about cookies support in the webview in the 10.11.1 version the Apps with 10.10.* still work

Thanks for sending those our way @Shua_Tal , and glad to hear you might have a solution on your end. If you’re still seeing the issue pop up, just let me know here and if you’re open to sharing the myshopify.com URL for the shop this is happening on, I can use that to do some further digging on our end here.

Hope this helps a bit!

My app is now 10.12.0, and it opens a browser instead of what it used to do, which was to open in a WebView inside the app. Where are these changes documented? Is this the new expected behaviour?

Hey @Shua_Tal thanks for flagging this. Generally, for POS UI extensions, they are rendered natively using extension targets and rendered within the POS App itself. If you’re open to sharing a screen recording of the issue you’re seeing and some minimal repro code I can definitely take a look to confirm expected behaviour with you. If you’d prefer to share that over a DM, just let me know and I can set one up with you.

Yes, lets setup a DM. However, we are thinking of changing course and using embed true
We were using
```const shopify = shopifyApp({

apiKey: process.env.SHOPIFY_API_KEY,

apiSecretKey: process.env.SHOPIFY_API_SECRET || “”,

apiVersion: ApiVersion.January25,

scopes: process.env.SCOPES?.split(“,”),

appUrl: process.env.SHOPIFY_APP_URL || “”,

authPathPrefix: “/auth”,

sessionStorage: new PrismaSessionStorage(prisma),

distribution: AppDistribution.AppStore,

isEmbeddedApp: false,

webhooks: {

APP_UNINSTALLED: {

deliveryMethod: DeliveryMethod.Http,

callbackUrl: “/webhooks”,

},

},

hooks: {

afterAuth: async ({ session }) => {

console.log(“:white_check_mark: Auth successful:”, session.shop, session.id);

try {

await shopify.registerWebhooks({ session });

  } catch (error) {

console.error(“:cross_mark: Webhook registration failed:”, error);

  }

},

},

future: {

// v3_webhookAdminContext: true,

// v3_authenticatePublic: true,

// v3_lineItemBilling: true,

unstable_newEmbeddedAuthStrategy: false,

},

…(process.env.SHOP_CUSTOM_DOMAIN

? { customShopDomains: [process.env.SHOP_CUSTOM_DOMAIN] }

: {}),

logger: {

level: LogSeverity.Debug,

httpRequests: true,

},

});```

app.tsx

  <ToastProvider>

<LocationProvider shopName={activeShopName as ShopName}>

Hey @Shua_Tal, as of POS 10.12, non-embedded apps are opened in an external browser rather than inside a webview. This is the expected behaviour for apps that aren’t embedded and aligns POS’ experience with Shopify Mobile.

1 Like