abbasfreestyle/react-native-af-video-player

Tried to register two views with the same name RCTVideo

Closed this issue ยท 16 comments

Here are some common things to include that can help your issue be diagnosed.

  • react-native-af-video-player version: 0.2.1

  • React Native version: 0.55.4

  • OS: iOS and Android

  • Has this issue already been raised? Yes

  • Have you clearly read and understood the Readme? Yes

  • Code and explanation to replicate this issue:
    Everytime when I tried to import Video from 'react-native-af-video-player' my app have errors Unhandled JS Exception: Tried to register two views with the same name RCTVideo and Module AppRegistry is not a registered callable module (calling runApplication)

  • Include Screeshots / Video:
    screenshot_1529565535

i am facing same issue

is there any solution for this?

@havinhthai can you give me the code that mentioned by error logs?

@yarakanigara Your mean this logs?

07-03 15:46:58.816 1015-1039/com.app E/Surface: getSlotFromBufferLocked: unknown buffer: 0xe19d2be0
07-03 15:47:00.365 1015-1039/com.app E/Surface: getSlotFromBufferLocked: unknown buffer: 0xe19d2b40
07-03 15:47:01.376 1015-1079/com.app E/ReactNativeJS: Tried to register two views with the same name RCTVideo
07-03 15:47:01.408 1015-1079/com.app E/ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)

@havinhthai I mean your line of code that produced that error message..
The most possible answer because you import 'react-native-video' twice. Since 'react-native-af-video-player' already import 'react-native-video' we should not import 'react-native-video' again. CMIIW

thanks issue resolved.

i get same issue. i didnt import 'react-native-video' again. but it still gets error.

I am having the same issue when I am importing "react-native-responsive-linechart"
any solution?
@shrivastavaanurag @yarakanigara @shrivastavaanurag

I am facing the same issue, I use react-native-video and react-native-af-video-player in two different components, I need both for my project, how can I use this two package together?

i get same issue. i didnt import 'react-native-video' again. but it still gets error.

did you clean your, settings.gradle , android/build.gradle , MainApplication.java files?

any one has a solution ? I am facing the same issue in 'Gifted Chat'

I uninstall both liabraries than intall my 'Gifted Chat' liabrary than install 'react-native-video' liabrary and now it's working.

I uninstall both liabraries than intall my 'Gifted Chat' liabrary than install 'react-native-video' liabrary and now it's working.

That's right. I think the problem is the caused by installation of more than one react-native-video. Use "npm list | grep react-native-video" to check how many react-native-video versions in your project. Delete the useless ones.

@arasemami Did you find any solution...?I have same issue.

Faced the same problem. What worked for me was using yarn's resolutions.

In package.json:
"dependencies": {
...
"react-native-video": "^5.0.0",
},
"resolutions": {
"react-native-af-video-player/react-native-video": "^5.0.0"
}

I am facing the same issue, I use react-native-video and react-native-af-video-player in two different components, I need both for my project, how can I use this two package together?

I have the same requirement, did you find any solution to hold both?