Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
82 stars 9 forks source link

window.print() no longer working #262

Open LittleLightLittleFire opened 6 months ago

LittleLightLittleFire commented 6 months ago

Describe the bug

print() works on desktop but not in POS App. This used to work since two weeks ago.

IMG_1014

To Reproduce

Steps to reproduce the behaviour:

  1. Create new app using yarn create @shopify/app, choose "Start with Remix", choose "JavaScript"
  2. Replace app/routes/app._index.jsx line 88's <button variant="primary" onClick={generateProduct}> => <button variant="primary" onClick={() => print()}> and update button text
  3. Open Shopify POS, click on More -> Settings -> All apps -> App
  4. Click on the "Print" button
  5. Nothing happens

Expected behaviour

Print dialog should popup on POS App, just as it does on desktop (tested with Chrome)

Actual behavior

Nothing happens when tested on:

iOS 16.6.1, 17.2.1 Shopify POS 8.22.2

Contextual information

Packages and versions

List the relevant packages you’re using, and their versions. For example:

  "dependencies": {
    "@prisma/client": "^4.13.0",
    "@remix-run/dev": "^2.0.0",
    "@remix-run/node": "^2.0.0",
    "@remix-run/react": "^2.0.0",
    "@remix-run/serve": "^2.0.0",
    "@shopify/app": "3.52.0",
    "@shopify/cli": "3.52.0",
    "@shopify/polaris": "^12.0.0",
    "@shopify/shopify-api": "^8.0.2",
    "@shopify/shopify-app-remix": "^2.1.0",
    "@shopify/shopify-app-session-storage-prisma": "^2.0.0",
    "isbot": "latest",
    "prisma": "^4.13.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },

Platform

Additional context

Used to work since two weeks ago. Also reported here: https://github.com/Shopify/shopify-app-template-remix/issues/461#issue-2050583475