question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invariant Violation: View config getter callback for component `RTCVideoView` must be a function (received `undefined`).

See original GitHub issue

I am trying to use react-native-web-rtc in project. I have done all the setup for ios

The code that we are using in “SomeView” component mentioned in error message

import {
  mediaDevices,
  MediaStream,
  RTCIceCandidate,
  RTCPeerConnection,
  RTCView,
} from 'react-native-webrtc';

const SomeView = () => {

 //... component logic

  return (
    <View style={s.LocalVideoStream}>
      {localStream && (
        <RTCView
          style={s.RTCView}
          streamURL={localStream && localStream.toURL()}
        />
      )}
    </View>
  );


}

i am getting this error

Invariant Violation: View config getter callback for component `RTCVideoView` must be a function (received `undefined`).

This error is located at:
    in RTCVideoView (at SomeView.react.tsx:96)
    in RCTView (at View.js:34)

Expected behavior

component to not throw this error?

Observerd behavior

This error in console when trying to use RCTView

Invariant Violation: View config getter callback for component `RTCVideoView` must be a function (received `undefined`).

Steps to reproduce the problem

  • install library
  • run pod install from ios
  • build debug build for simulator from xcode

i have tried bunch of stuff like

  • pod install
  • npx pod-install
  • react-native link react-native-webrtc
  • clear watchman cache, clear pod cache

this issue still persist, i think library is not able to identify nativeModule,

Haven’t tried this with android, this issue is when working with ios

This is similar to issue we have with react-native-linear-gradient library

https://github.com/react-native-linear-gradient/react-native-linear-gradient/issues/538

Platform information

  • React Native version: 0.64.2
  • Plugin version:
  • OS: iOS
  • OS version: 15.4.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
arslan786786commented, Feb 15, 2022

i am so confused about this problem

0reactions
Oliver-Zimmermancommented, Aug 24, 2022

@pankajvaghela did you solve this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

view config getter callback for component 'div' must be a ...
Error is: Invariant Violation: view config getter callback for component 'form' must be a function (received 'undefined').
Read more >
React Native: View config getter callback for component must ...
Invariant Violation : View config getter callback for component `div` must be a function (received `undefined`). Make sure to start component names with...
Read more >
invariant violation: view config getter callback for component `input ...
it is throwing me the following error: Invariant Violation: View config getter callback for component a must be a function (received undefined )....
Read more >
view config getter callback for component 'div' must be a ...
Coding example for the question view config getter callback for component 'div' must be a function (received 'undefined'). Make sure to start component...
Read more >
Invariant violation : View config for component `textarea` must ...
Error - Invariant violation : View config for component `textarea` must be a function(received undefined). Make sure to start component ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found