expo: `Invalid view returned from registry, expecting EXVideo, got: (null)`
Summary
After moving from expo unimodules to expo modules and updating my expo-av package from 9.1.2 to 12.0.2, I keep getting an intermittent Invalid view returned from registry, expecting EXVideo, got: (null) error:
<Video
isLooping
shouldPlay
resizeMode={'cover'}
useNativeControls={false}
source={{
url: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
}}
/>
I also upgraded a bunch of other packages including react-native. I did not get these errors prior to upgrading my packages. The only other issue I could find #3115 but it didn’t have a resolution.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
46.0.1
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 11.4
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.16.0 - /usr/local/bin/node
Yarn: 1.22.18 - ~/.yarn/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
Watchman: 2022.07.04.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK:
API Levels: 31
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0
System Images: android-30 | Google Play Intel x86 Atom, android-31 | Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
npmPackages:
expo: 46.0.1 => 46.0.1
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
react-native: ^0.69.3 => 0.69.3
npmGlobalPackages:
expo-cli: 6.0.0
Expo Workflow: bare
Reproducible demo
I couldn’t set the versions to my package versions so the error isn’t showing up
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (8 by maintainers)
I don’t think this is fixed, we’re getting lots of these on 13.0.1
Hi Henry, it happened to you locally? I got a LOT of them in production in my Bugsnag Dashboard, but never saw it. Is it actually crashing the app or is it just a log? I am trying to resolve the issue for days now, but nothing worked so far. Upgraded RN, tried different versions of expo-av…
The fix for this issue is now available in version
12.0.3🙂Thank you!
OK, I got it, reproduced, know what’s wrong and will fix it today.
I made a very basic mistake 🙈 - the
unloadAsync()is asynchronous andtry-catchisn’t working, becausecomponentWillUnmountisn’tasyncfunction. Replacingtry { unloadAsync() } catch { }with Promise-likeunloadAsync().catch(() => {})solves this issue.