react-native icon indicating copy to clipboard operation
react-native copied to clipboard

View config getter callback for component `RNVLCPlayer` must be a function (received `undefined`)

Open 1280103995 opened this issue 3 years ago • 0 comments

Description

I tried to support the new architecture with the reactive-vlc-media-player library, but I was stuck for two weeks. I checked the libraries that currently support the new architecture, but none of them solved my problem.

This is the error message I got: "Invariant Violation: View config getter callback for component RNVLCPlayer must be a function (received undefined)", which occurs on Android and iOS.

Version

0.70.6

Output of npx react-native info

System:
    OS: macOS 12.6.2
    CPU: (8) arm64 Apple M1 Pro
    Memory: 212.69 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.9.1 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.19.1 - /opt/homebrew/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.12 - /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.6 => 0.70.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. run npx reat-native init demo0706 -- version 0.70.6 and enable the new architecture.
  2. add react-native-vlc-media-player to package.json.

For example

"dependencies": {
    "react": "18.1.0",
    "react-native": "0.70.6",
    "react-native-vlc-media-player": "git+https://github.com/1280103995/react-native-vlc-media-player.git"
  }
  1. run yarn.
  2. add code
import {VLCPlayer} from "react-native-vlc-media-player";

<VLCPlayer
        source={{uri: 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4'}}
       style={{width: '100%', height: 200}}
/>

Snack, code example, screenshot, or link to a repository

My repository: https://github.com/1280103995/react-native-vlc-media-player

1280103995 avatar Jan 11 '23 07:01 1280103995