Skip to content

Safari (Web) shows black vertical half of camera preview on Flutter 3.42.0 + mobile_scanner 7.1.4 (works on Flutter 3.38.10) #1655

@work8mode

Description

@work8mode

Safari Web has an issue with camera preview rendering that appears after upgrading Flutter.

Environment

  • Flutter: 3.42.0

  • Browser: Safari 26.2 (iOS)

  • Package: mobile_scanner 7.1.4

  • Platform: Flutter Web (Safari on iOS)

Problem

When opening the scanner screen in Safari (iOS) the camera preview is not rendered correctly: a vertical half of the scanning area becomes a black stripe (roughly 50% of the preview is black). In some cases, instead of a vertical black stripe, the preview becomes completely black.

This problem is NOT observed in other browsers (only Safari is affected).

Also, this does not happen on Flutter 3.38.10 — everything works normally there. The issue starts appearing on newer Flutter versions (reproduced on 3.42.0).

Screenshots

Preview issue (black half of the scanner):

Image

Console errors screenshot:

Image

Safari console shows:

Unhandled Promise Rejection: Error

Trying to play video that is already playing.

WebGL: non-portable extension enabled: WEBGL_polygon_mode

Reproduction

Unfortunately I cannot provide a minimal reproducible project/code due to internal project limitations.
I’m creating this issue mainly for other users who might hit the same Safari/Web problem — maybe this report will help them.

Temporary workaround

The workaround I found is to downgrade Flutter to 3.38.10.
On 3.38.10 Safari Web scanner preview works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions