- Notifications
You must be signed in to change notification settings - Fork7.6k
Description
Minimal reproducible example
https://github.com/chriscoomber/expo-52-expo-camera-repro/tree/web-repro
What platform(s) does this occur on?
Web
Where did you reproduce the issue?
on web
Summary
When running expo-camera on web, the camera preview stays blank (transparent).
This only occurs one some devices (I'm using Samsung S20 FE, Android 11) and on some web browsers (I'm using Chrome for Android, v133.0.6843.137). In particular, from our testing there is no issue when using Firefox, we've seen no issues on iOS devices. It's just Chrome on Android. Some other Android devices seem to be affected - our customers have complained also about this occurring on ChromeBooks.
Interesting to note, the situation is resolved by waiting a long time (~30 seconds) and then re-creating theCameraView
. I have added a button to the minimal reproduction code (linked above - branchweb-repro
), which re-creates theCameraView
. This is not a valid workaround for us.
See attached video:
camera-issue.webm
On this minimal reproduction, the situation can also be resolved by refreshing the page. After refreshing, this minimal repro app doesn't need to ask for permissions again, so maybe that's relevant somehow.
Also worth noting, in my actual app (which I can't share the source for), refreshing the page doesn't help, but waiting ~30 seconds and re-creating theCameraView
does still help. It's very bizarre.
I'd also be open to learning how to debug this for myself, but I'm quite out of my depth.
Environment
expo-env-info 1.2.2 environment info: System: OS: macOS 14.0 Shell: 5.9 - /bin/zsh Binaries: Node: 23.2.0 - /opt/homebrew/bin/node Yarn: 1.22.22 - ~/.yarn/bin/yarn npm: 10.9.0 - /opt/homebrew/bin/npm Watchman: 2025.03.10.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.16.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4 IDEs: Android Studio: 2023.2 AI-232.10300.40.2321.11668458 Xcode: 15.3/15E204a - /usr/bin/xcodebuild npmPackages: expo: ~52.0.31 => 52.0.31 react: 18.3.1 => 18.3.1 react-dom: 18.3.1 => 18.3.1 react-native: 0.76.7 => 0.76.7 react-native-web: ~0.19.13 => 0.19.13 npmGlobalPackages: eas-cli: 14.3.1 Expo Workflow: managed
Expo Doctor Diagnostics
(node:31302) ExperimentalWarning: CommonJS module /opt/homebrew/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /opt/homebrew/lib/node_modules/npm/node_modules/supports-color/index.js using require().Support for loading ES Module in require() is an experimental feature and might change at any time(Use `node --trace-warnings ...` to show where the warning was created)14/15 checks passed. 1 checks failed. Possible issues detected:Use the --verbose flag to see more details about passed checks.✖ [Validate packages against React Native Directory package metadata]The following issues were found when validating your dependencies against React Native Directory:No metadata available: @expo/metro-runtimeAdvice: - Update React Native Directory to include metadata for unknown packages. Alternatively, set expo.doctor.reactNativeDirectoryCheck.listUnknownPackages in package.json to false to skip warnings about packages with no metadata, if the warning is not relevant.1 check failed, indicating possible issues with the project.