Git Product home page Git Product logo

Comments (17)

mohit41999 avatar mohit41999 commented on May 29, 2024 2

This above error occurs whenever i press disconnect button and after that black screen occurs

from videouikit-flutter.

mohit41999 avatar mohit41999 commented on May 29, 2024 2

@Meherdeep @khlewesamer .. sorry for the late reply ..yes i got it solved by the same method suggested by you both .. thank you for the help.

from videouikit-flutter.

khlewesamer avatar khlewesamer commented on May 29, 2024 1

the black screen is still there but I work around it by adding my one end button and passing it in extraButtons

from videouikit-flutter.

Meherdeep avatar Meherdeep commented on May 29, 2024 1

@mohit41999 The black screen that you mentioned occurs because there is no other screen in the navigation stack. So when you end the call Navigator.pop(context) pushes it to an empty screen.

from videouikit-flutter.

khlewesamer avatar khlewesamer commented on May 29, 2024 1

I resolve sessionController problem by disable default end call button then add my own in extraButton , the problem comes from tring to disposed controller after widget gone

from videouikit-flutter.

kairakhatri avatar kairakhatri commented on May 29, 2024 1

@khlewesamer I did same thing you mentioned, but i kept on getting that same error. A SessionController was used after being disposed.

Did you fix it?😶

from videouikit-flutter.

waqadArshad avatar waqadArshad commented on May 29, 2024 1

@Meherdeep could you take a look at this Monday?

@maxxfrazer @Meherdeep

Thanks for this I updated the agora versions and it got resolved. But I am now getting this following error quite often.

PlatformException(-17, request to join channel is rejected, null, null)

Agora version:

agora_uikit: ^1.0.2

Here is my configuration:

final AgoraClient client = AgoraClient(
    agoraConnectionData: AgoraConnectionData(
      appId: "40216abc119348c4a6236c11ab1a0c3e",
      tokenUrl: "https://nikah----match.herokuapp.com",
      // tokenUrl: "https://nikah--match.herokuapp.com/access_token?",
      channelName: currentChannel,
      uid: 0,
      rtmEnabled: false,
    ),
    enabledPermission: [
      Permission.camera,
      Permission.microphone,
    ],
  );

using this in initState:

  void initAgora() async {
    log("Channel name before client.initialize() is: $channelName");
    try {
      await client.initialize();
    } catch (e) {
      showErrorDialog(
        title: "Error!",
        description: "Some unknown error was thrown while joining the call. Trying again.",
      );
      log("exceotion is: $e"); // this logs that above error.
      await client.initialize();
    }
  }

and my flutter doctor -v:

[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1706], locale en-US)
    • Flutter version 2.10.5 at C:\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (10 weeks ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\waqad\AppData\Local\Android\sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.68.1)
    • VS Code at C:\Users\waqad\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
    • RMX2030 (mobile)  • b37273eb • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows  • windows-x64    • Microsoft Windows [Version 10.0.19044.1706]
    • Chrome (web)      • chrome   • web-javascript • Google Chrome 102.0.5005.115
    • Edge (web)        • edge     • web-javascript • Microsoft Edge 102.0.1245.44

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Can you please have a look? I search for it but could understand what is causing this. It is really very annoying. Thanks for your time.

from videouikit-flutter.

khlewesamer avatar khlewesamer commented on May 29, 2024

after i comment this line
//widget.client.sessionController.dispose();
in AgoraVideoViewer file that solve the bug , mybe sessionController disoposied before this line ,
if this solve problim pls do new push

from videouikit-flutter.

deShodhan avatar deShodhan commented on May 29, 2024

This above error occurs whenever i press disconnect button and after that black screen occurs

@mohit41999 Did you resolve the problem? You get the blank screen when you do not initialize agora properly. I resolved the blank screen but the sessionController error still exists.

from videouikit-flutter.

dev-justine avatar dev-justine commented on May 29, 2024

@khlewesamer

I still have the same issue, can you please, show your code to end the call?

from videouikit-flutter.

dev-justine avatar dev-justine commented on May 29, 2024

after i comment this line //widget.client.sessionController.dispose(); in AgoraVideoViewer file that solve the bug , mybe sessionController disoposied before this line , if this solve problim pls do new push

This is my custom function to end the call
void endConsultation(context) async{ await client.sessionController.endCall(); Navigator.pop(context); }
But, I still get the error: a sessionController was used after being disposed.

I also get the error when I just pop the video call screen to a previous screen, without disposing any controller.

from videouikit-flutter.

khlewesamer avatar khlewesamer commented on May 29, 2024
extraButtons: [
                            FloatingActionButton(
                                backgroundColor: Colors.red,
                                child: Icon(Icons.call_end),
                                onPressed: () => _endMeating(context))
                          ],
                          enabledButtons: [
                            
                            BuiltInButtons.toggleCamera,
                            BuiltInButtons.toggleMic
                          ],
_endMeating(){
await client.sessionController.endCall();
Navigator.pop(context);

}

don't forget to comment on that line in AgoraVideoViewer file

last thing after edit AgoraVideoViewer file u need rerun the app

from videouikit-flutter.

dev-justine avatar dev-justine commented on May 29, 2024

@khlewesamer I did same thing you mentioned, but i kept on getting that same error.
A SessionController was used after being disposed.

from videouikit-flutter.

alimajid124 avatar alimajid124 commented on May 29, 2024

how we can solve this problem while using Adora UI Kit when we have default functionality

from videouikit-flutter.

waqadArshad avatar waqadArshad commented on May 29, 2024

@Ascenio @hxingpax @Meherdeep @tadaspetra @maxxfrazer
The same thing, even after putting my custom button and calling:

await client.sessionController.endCall();

I am still getting the error: SessionController was used after being disposed.

from videouikit-flutter.

waqadArshad avatar waqadArshad commented on May 29, 2024

@Ascenio @hxingpax @Meherdeep @tadaspetra @maxxfrazer The same thing, even after putting my custom button and calling:

await client.sessionController.endCall();

I am still getting the error: SessionController was used after being disposed.

@khlewesamer @Meherdeep @deShodhan @mohit41999 does anyone have any real solution for this. and why isn't this fixed in the package itself?
Thanks

from videouikit-flutter.

maxxfrazer avatar maxxfrazer commented on May 29, 2024

@Meherdeep could you take a look at this Monday?

from videouikit-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.