AgoraIO-Community / VideoUIKit-ReactNative

A React Native package to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
MIT License
93 stars 43 forks source link

Quick start example not working react-native 0.7 #130

Closed bennaaym closed 1 year ago

bennaaym commented 1 year ago

Target device: (Note: simulators are not supported for running the UIKit)

App Info

Describe the issue

const App = () => {
  const [videoCall, setVideoCall] = useState(false);
  const connectionData = {
    appId: 'APP_ID',
    channel: 'CHANNEL_NAME',
    token: 'TOKEN'
  };
  const callbacks = {
    EndCall: () => setVideoCall(false),
  };
  return videoCall ? (
    <AgoraUIKit connectionData={connectionData} rtcCallbacks={callbacks} />
  ) : (
    <Text onPress={() => setVideoCall(true)}>Start Call</Text>
  );
};

I'm not able to use the quickstart example in my app, when running the app I'm getting the following error:

TypeError: Cannot read property 'prefix' of null, js engine: hermes
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 10): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

The error is cause by the component removing it my app is working as expected.

To Reproduce Steps to reproduce the behavior:

  1. Run the quick start example : https://www.npmjs.com/package/agora-rn-uikit
EkaanshArora commented 1 year ago

Did you install the native dependency? npm i react-native-agora, if you're on iOS you'll also have to install pods npx pod-install.

bennaaym commented 1 year ago

I did install all necessary dependencies @EkaanshArora

EkaanshArora commented 1 year ago

Can you share your package.json?

bennaaym commented 1 year ago

@EkaanshArora I found another SDK that worked for me. I will close this issue. Thank you for help