Skip to content

🐛[Android] Camera renders stuck to the top of the screen on initial mount #3897

@BohdanPylypchuk

Description

@BohdanPylypchuk

Prerequisites

Reproduction

https://github.com/BohdanPylypchuk/vission-camera-ui-issue-demo

Steps to reproduce

  1. Clone the repo https://github.com/BohdanPylypchuk/vission-camera-ui-issue-demo
  2. run the app on android 11
  3. open the camera screen
vission-camera-bug.mp4

What did you expect to happen?

The camera renders in the center and is not stuck to the top of the screen on initial mount

What actually happened?

The <Camera> component from react-native-vision-camera renders stuck to the top of the screen on initial mount, ignoring the flex layout. The position resolves itself after a fast refresh or a style change is triggered.

Affected platforms

Android (device), Android (emulator)

Device(s) affected

Android 11 — Redmi Note 8 Pro, Android 16 emulators

VisionCamera version

5.0.9

React Native version

0.81.5

React Native architecture

New Architecture (Fabric / bridgeless)

Features being used

  • Preview
  • Photo capture
  • Video capture
  • Frame Processors (worklets)
  • Skia Frame Processors
  • Code/Barcode Scanner
  • Location metadata
  • Multi-cam
  • Depth data
  • HDR / custom dynamic range
  • Custom format / FPS / resolution

Relevant logs / stack trace

no logs

Additional context

No response

Submission

  • The reproduction I linked is either (preferred) a PR against this repo that adds a failing harness test following the harness-tests README, or (fallback) a public repo that reproduces the bug on a fresh clone. I understand the issue will be closed without one.
  • I pasted logs as text (not screenshots).
  • I wrote this report in my own words. I did not paste AI-generated descriptions of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions