Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violation: requireNativeComponent: "AmazonIvs" was not found in the UIManager. #168

Open
adok0001 opened this issue Dec 12, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@adok0001
Copy link

adok0001 commented Dec 12, 2023

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 ;
}
`

Expected behavior
It should render a video player from the specified stream.

Screenshots
image

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
@adok0001 adok0001 added the bug Something isn't working label Dec 12, 2023
@youssrif
Copy link

youssrif commented Apr 4, 2024

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

@crispiestsquid
Copy link

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...

@crispiestsquid
Copy link

crispiestsquid commented Apr 8, 2024

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
}

@adok0001
Copy link
Author

adok0001 commented Apr 8, 2024

@crispiestsquid I ended up running with development builds. Couldn't get the app to work in Expo Go

@youssrif
Copy link

youssrif commented Apr 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants