Skip to content

Shopify App Bridge scanner shows blank scan screen intermittently on IOS #535

@DylanHenderson

Description

@DylanHenderson

Describe the bug

When using the app bridge Scanner API https://shopify.dev/docs/api/app-bridge-library/apis/scanner the camera intermittently opens to a black screen with the scan outline still visible. The camera screen needs to be closed and reopened to proceed with scanning an item.

To Reproduce

Steps to reproduce the behaviour:

Implement the simple scanner behavior from here:
https://shopify.dev/docs/api/app-bridge-library/apis/scanner

for example:

onClick={async () => { const payload = await shopify.scanner.capture(); handlePayload(payload) }}

You can get the screen to appear by randomly switching between scanning items and clicking "cancel" to close the scanner. Eventually you'll see the blank screen. Sometimes it happens every 2nd scan, sometimes every 20th.

Expected behaviour

The scanner should not show a black screen on IOS devices.

Contextual information

Tested on multiple IOS devices with versions 18.6 and 18.7
This has been happening for a few months, I thought this was a camera issue until other users started reporting the problem. This never used to happen.

Packages and versions

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

  • @shopify/app-bridge-react @ 4.2.3
  • @shopify/polaris @ 13.9.0

Platform

  • OS: IOS
  • OS Version: 18.6 and 18.7
  • App: Shopify Mobile

Additional context

Image attached showing blank camera.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions