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: "main" has not been registered #161

Open
elieobeid7 opened this issue Jul 21, 2024 · 0 comments
Open

Invariant Violation: "main" has not been registered #161

elieobeid7 opened this issue Jul 21, 2024 · 0 comments

Comments

@elieobeid7
Copy link

elieobeid7 commented Jul 21, 2024

just following the tutorial on the readme

import React, {useState} from 'react';
import AgoraUIKit from 'agora-rn-uikit';

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

export default App;

I get this error if I try to open the app on an android emulator

 ERROR  Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

and if I try to open it on expo go I get this error

 ERROR  Error: The package 'react-native-agora' doesn't seem to be linked. Make sure:

- You rebuilt the app after installing the package
- You are not using Expo Go
, js engine: hermes

I'm using the latest expo SDK and the latest agora sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant