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

object reference not set to an instance of an object , agora forms #30

Open
usmanrwp opened this issue Jul 24, 2021 · 1 comment
Open

Comments

@usmanrwp
Copy link

AgoraService not initialize _agoraService object , on the next line _agoraService.JoinChannelSuccess it gives exception object reference not set to an instance of an object because AgoraService.Current not initialize the object it remains null

public void Init()
{
_isEnded = false;
if (_agoraService == null)
{
_agoraService = AgoraService.Current;
_agoraService.JoinChannelSuccess += (uid) => { };
_agoraService.OnDisconn
Screenshot 2021-07-25 at 2 41 08 AM
ected += OnDisconnected;
_agoraService.OnNewStream += OnNewStream;
_agoraService.StartSession(Room, Consts.AgoraAPI, Consts.Token, webSdkInteroperability: true);
}
}

@alexsorokoletov
Copy link
Contributor

Hi @usmanrwp!

Thank for the issue. Is that something that happens in the sample or somewhere else in another project?

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

2 participants