ConnectyCube / connectycube-flutter-sdk-releases

ConnectyCube Flutter SDK Releases
7 stars 1 forks source link

NoSuchMethodError (NoSuchMethodError: The getter 'isPaused' was called on null. #11

Closed rdhillbb closed 4 years ago

rdhillbb commented 4 years ago

Platform (use [x]) [x ] Android [ ] iOS

Device info Manufacture: [Realme] Model: [e.g. iPhone 11 Pro Max] OS version: Android 10

_callClient = P2PClient.instance; _callClient.init(); <------ Causes NoSuchMethodError (NoSuchMethodError: The getter 'isPaused' was called on null.

init() cannot be called until the login to the back end has completed. It took me a while to figure this out from the sample code that there is a built in delay using a flag to indicate when login has completed. Not obvious. My solution is the following:

CubeChatConnection.instance.login(user).then((cubeUser) {

_callClient = P2PClient.instance; _callClient.init(); }).catchError(heyDocError);

I have my solution. From the flutter documentation the following is not obvious:

  1. Initialization sequence of API calls.
  2. How the non-connectycub APIs are to be used. If the sample applications were not available, I am not sure how I would proceed to use your SDK.

What I reported may not be considered a bug/issue, I think. But there is a lack of clarity from the documentation. But the sample code could be considered documentation.

Steps to Reproduce:

Logs:

log here

or Gist log

Actual result:

Expected behavior:

Additional info Add any other context about the problem here.

TatankaConCube commented 4 years ago

thank you for your question, but in our documentation, we are saying about it https://developers.connectycube.com/flutter/videocalling?id=p2pclient-setup

ConnectyCube Chat API is used as a signaling transport for Video Calling API, so in order to start using Video Calling API, you need to connect to Chat.

Our clients have a lot of projects with different structures and architectures and we can't provide examples for all cases, sorry.

rdhillbb commented 4 years ago

Thank you for your reply. My comment may not have been clear. I understand now that before proceeding with other API calls, I need to wait for the login(Cat Connection( to complete which is asynchronous.

I am good

Randolph Davis Hill Fat Tree IO ipnudavis@fattree.io +855-969-007-829 +1209-232-1157

On 9 Sep 2020, at 10:18 PM, TatankaConCube notifications@github.com wrote:

thank you for your question, but in our documentation, we are saying about it https://developers.connectycube.com/flutter/videocalling?id=p2pclient-setup https://developers.connectycube.com/flutter/videocalling?id=p2pclient-setup ConnectyCube Chat API is used as a signaling transport for Video Calling API, so in order to start using Video Calling API, you need to connect to Chat.

Our clients have a lot of projects with different structures and architectures and we can't provide examples for all cases, sorry.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ConnectyCube/connectycube-flutter-sdk-releases/issues/11#issuecomment-689631641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEGZ5F6HDKX6PBXETMQ3G4TSE6MDDANCNFSM4RCP7UDQ.