Invariant Violation: requireNativeComponent: "AmazonIvs" was not found in the UIManager.
Describe the bug Using the IVSPlayer component at any point in my expo-managed app causes it to break with the error "Invariant Violation: requireNativeComponent: "AmazonIvs" was not found in the UIManager."
To reproduce Steps to reproduce the behavior. Snack Install expo Create a new expo app expo install 'amazon-ivs-react-native-player' Add the following code to App.tsx/js ` import IVSPlayer from 'amazon-ivs-react-native-player';
const URL = 'https://fcc3ddae59ed.us-west-2.playback.live-video.net/api/video/v1/us-west-2.893648527354.channel.DmumNckWFTqz.m3u8';
function App() { return <IVSPlayer streamUrl={URL} />; } `
Expected behavior It should render a video player from the specified stream.
Screenshots
Device (please complete the following information):
- Simulator or Real Device: Both
- Device: iPhone XR
- OS: iOS 17
Debug logs
Invariant Violation: requireNativeComponent: "AmazonIvs" was not found in the UIManager.
This error is located at: in AmazonIvs in RCTView (created by View) in View in Unknown (created by App) in App (created by withDevTools(App)) in withDevTools(App) in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in main(RootComponent), js engine: hermes at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in reportException at node_modules\react-native\Libraries\Core\ExceptionsManager.js:null in handleException
- ... 7 more stack frames from framework internals
hello adok0001
if you still have this error you can use this documentation it will help you
https://github.com/aws/amazon-ivs-react-native-player/blob/main/docs/migration-guides.md
I am getting the same issue as well. @youssrif I looked at the docs, but there is nothing there that is relevant since the migration of the package name changing...
Just to include some more details here is my package.json
{
"name": "ivs-react-native",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"amazon-ivs-react-native-player": "^1.5.0",
"expo": "~50.0.14",
"expo-status-bar": "~1.11.1",
"react": "18.2.0",
"react-native": "0.73.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.2.45",
"typescript": "^5.1.3"
},
"private": true
}
@crispiestsquid I ended up running with development builds. Couldn't get the app to work in Expo Go
hi @adok0001 @crispiestsquid i work with React-native-cli not with expo in the documentation guide https://github.com/aws/amazon-ivs-react-native-player/blob/main/docs/migration-guides.md in the file migration-guides.md there is import line that must be added in the MainApplication.java for the android also in the Podfile for the ios it solve the probleme but in expo the probleme could not be solved