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

Unhandled Exception: NoSuchMethodError: The getter 'isPaused' was called on null. #39

Closed
Bharavi26 opened this issue Nov 17, 2020 · 5 comments

Comments

@Bharavi26
Copy link

Bharavi26 commented Nov 17, 2020

Specify the sample to which the issue belongs (use [x]):
[√] P2P Call sample

Platform (use [x])
[√] Flutter

Flutter Doctor
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
• Flutter version 1.22.1 at F:\flutter_sdk\flutter
• Framework revision f30b7f4db9 (6 weeks ago), 2020-10-08 10:06:30 -0700
• Engine revision 75bef9f6c8
• Dart version 2.10.1

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
• Android SDK at \AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.0-rc4
• ANDROID_SDK_ROOT = \AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 48.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.51.0)
• VS Code at \AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.16.0

[√] Connected device (1 available)
• vivo 1818 (mobile) • d14b5985 • android-arm64 • Android 10 (API 29)

Describe the bug:
when i try to P2PClient init it returns 'isPaused' called on null,
Unhandled Exception: NoSuchMethodError: The getter 'isPaused' was called on null.
RTCSignalingProcessor.addSignalingCallback (package:connectycube_sdk/src/calls/rtc_signaling_processor.dart:169:23)

@TatankaConCube
Copy link
Contributor

@Bharavi26 do login to the chat before P2PClient.instance.init() like in our sample.

@Bharavi26
Copy link
Author

Bharavi26 commented Nov 17, 2020

@TatankaConCube sir thank you for reply,
i already coded for login before init

  • here is my login code sample
    ================

static LoginToConnectyCube(BuildContext context,int idtype){
if(CubeChatConnection.instance.currentUser == null){
int userid = int.parse("$idtype${Constant.session.getData(UserSessionManager.KEY_ID)}");
CubeUser user = new CubeUser(
id: userid,
login: "call_$userid",
fullName: "${Constant.session.getData(UserSessionManager.KEY_FNAME)} ${Constant.session.getData(UserSessionManager.KEY_LNAME)}",
password: Constant.ConnectyCube_DEFAULT_PASS,
email: Constant.session.getData(UserSessionManager.KEY_EMAIL),
phone: Constant.session.getData(UserSessionManager.KEY_PHONE),
);
if (CubeSessionManager.instance.isActiveSessionValid()) {
CubeChatConnection.instance.login(user);
} else {
createSession(user).then((cubeSession) {
CubeChatConnection.instance.login(user);
});
}
}
}

@TatankaConCube
Copy link
Contributor

you call CubeChatConnection.instance.login(user); asynchronously. You should init P2PClient or in then callback, or call login to the chat synchronously (via await).

@TatankaConCube
Copy link
Contributor

@Bharavi26 did you resolve your issue?

@TatankaConCube
Copy link
Contributor

No more activity, so closing.

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