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

[BUG] : package:agora_rtc_engine/src/render/video_view_controller.dart: Failed assertion: Using Flutter agora_uikit #147

Open
itsdani121 opened this issue Jul 8, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@itsdani121
Copy link

itsdani121 commented Jul 8, 2023

Describe the bug

When i am testing the app and when other user join channel after fiew seconds it happens when new user join then old user got this error.

package:agora_rtc_engine/src/render/video_view_controller.dart: Failed assertion: line 75 pos 16 canvas.uid!=null && canvas.uid!=0 , remote uid cannot be null or 0 "

i don't know why this happens

here is my code

  agora_uikit: ^1.3.4
Flutter 3.10.5 • channel stable • https://github.com/flutter/flutter.git 
Framework • revision 796c8ef792 (3 weeks ago) • 2023-06-13 15:51:02 -0700
Engine • revision 45f6e00911
Tools • Dart 3.0.5 • DevTools 2.23.1


 final AgoraClient client = AgoraClient(
      agoraConnectionData: AgoraConnectionData(
        appId: appId,
        channelName: channelName,
      ),
      enabledPermission: [Permission.camera, Permission.microphone]);

  @override
  void initState() {
    super.initState();
    initAgora();
  }

  void initAgora() async {
    await client.initialize();
  }
 Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Agora UI Kit'),
          centerTitle: true,
        ),
        body: SafeArea(
          child: Stack(
            children: [
              AgoraVideoViewer(
                client: client,
                layoutType: Layout.floating,
                enableHostControls: true,
                showNumberOfUsers: false, // Add this to enable host controls
              ),
              AgoraVideoButtons(
                client: client,
                onDisconnect: () => Navigator.pop(context),
              ),
            ],
          ),
        ),
      ),
    );
  }

"Another thing is when i run this app almost 10-15min my device heatup very high i dont know why this happens any idea to cooldown for long video call so i can use this or share example about this issue which i am facing.."
my version is
error

@itsdani121 itsdani121 added the bug Something isn't working label Jul 8, 2023
@Meherdeep
Copy link
Contributor

@itsdani121 Should be solved with the latest release

@itsdani121
Copy link
Author

Latest release give analysis issues kindly check it

@Meherdeep
Copy link
Contributor

@itsdani121 pub.dev was evaluating the package. You should be able to use it now :)

@itsdani121
Copy link
Author

But on pub latest version it says rtc connection error

@Meherdeep
Copy link
Contributor

Can you share the logs

@Marshysaurus
Copy link

Marshysaurus commented Oct 4, 2023

@Meherdeep I have agora_uikit: 1.3.7 and this is still an issue

What happens is that another user joins the call and it's all fine, their view floats in the upper part of the screen. However, when the user taps on their 📌 icon, the error is thrown. Here are some images to illustrate:


These are my logs during the call:

The following assertion was thrown building:
Remote uid can not be null or 0
'package:agora_rtc_engine/src/render/video_view_controller.dart':
video_view_controller.dart:1
Failed assertion: line 81 pos 16: 'canvas.uid != null && canvas.uid != 0'


When the exception was thrown, this was the stack
#2      new VideoViewController.remote
video_view_controller.dart:81
#3      _FloatingLayoutState._getRemoteViews
floating_layout.dart:88
#4      _FloatingLayoutState._viewFloat.<anonymous closure>
floating_layout.dart:337
#5      SliverChildBuilderDelegate.build
scroll_delegate.dart:489
#6      SliverMultiBoxAdaptorElement._build
sliver.dart:828
#7      SliverMultiBoxAdaptorElement.performRebuild.processElement
sliver.dart:758
#8      Iterable.forEach (dart:core/iterable.dart:346:35)
#9      SliverMultiBoxAdaptorElement.performRebuild
sliver.dart:805
#10     SliverMultiBoxAdaptorElement.update
sliver.dart:734
#11     Element.updateChild
framework.dart:3686
#12     ComponentElement.performRebuild
framework.dart:5111
#13     Element.rebuild
framework.dart:4805
#14     ProxyElement.update
framework.dart:5417
#15     Element.updateChild
framework.dart:3686
#16     SingleChildRenderObjectElement.update
framework.dart:6442
#17     Element.updateChild
framework.dart:3686
#18     RenderObjectElement.updateChildren
framework.dart:6093
#19     MultiChildRenderObjectElement.update
framework.dart:6595
#20     _ViewportElement.update
viewport.dart:236
#21     Element.updateChild
framework.dart:3686
#22     SingleChildRenderObjectElement.update
framework.dart:6442
#23     Element.updateChild
framework.dart:3686
#24     SingleChildRenderObjectElement.update
framework.dart:6442
#25     Element.updateChild
framework.dart:3686
#26     SingleChildRenderObjectElement.update
framework.dart:6442
#27     Element.updateChild
framework.dart:3686
#28     SingleChildRenderObjectElement.update
framework.dart:6442
#29     Element.updateChild
framework.dart:3686
#30     ComponentElement.performRebuild
framework.dart:5111
#31     StatefulElement.performRebuild
framework.dart:5251
#32     Element.rebuild
framework.dart:4805
#33     StatefulElement.update
framework.dart:5274
#34     Element.updateChild
framework.dart:3686
#35     SingleChildRenderObjectElement.update
framework.dart:6442
#36     Element.updateChild
framework.dart:3686
#37     ComponentElement.performRebuild
framework.dart:5111
#38     Element.rebuild
framework.dart:4805
#39     ProxyElement.update
framework.dart:5417
#40     Element.updateChild
framework.dart:3686
#41     SingleChildRenderObjectElement.update
framework.dart:6442
#42     Element.updateChild
framework.dart:3686
#43     ComponentElement.performRebuild
framework.dart:5111
#44     Element.rebuild
framework.dart:4805
#45     ProxyElement.update
framework.dart:5417
#46     Element.updateChild
framework.dart:3686
#47     SingleChildRenderObjectElement.update
framework.dart:6442
#48     Element.updateChild
framework.dart:3686
#49     SingleChildRenderObjectElement.update
framework.dart:6442
#50     Element.updateChild
framework.dart:3686
#51     SingleChildRenderObjectElement.update
framework.dart:6442
#52     Element.updateChild
framework.dart:3686
#53     ComponentElement.performRebuild
framework.dart:5111
#54     Element.rebuild
framework.dart:4805
#55     ProxyElement.update
framework.dart:5417
#56     Element.updateChild
framework.dart:3686
#57     ComponentElement.performRebuild
framework.dart:5111
#58     StatefulElement.performRebuild
framework.dart:5251
#59     Element.rebuild
framework.dart:4805
#60     StatefulElement.update
framework.dart:5274
#61     Element.updateChild
framework.dart:3686
#62     ComponentElement.performRebuild
framework.dart:5111
#63     StatefulElement.performRebuild
framework.dart:5251
#64     Element.rebuild
framework.dart:4805
#65     StatefulElement.update
framework.dart:5274
#66     Element.updateChild
framework.dart:3686
#67     ComponentElement.performRebuild
framework.dart:5111
#68     Element.rebuild
framework.dart:4805
#69     StatelessElement.update
framework.dart:5162
#70     Element.updateChild
framework.dart:3686
#71     SingleChildRenderObjectElement.update
framework.dart:6442
#72     Element.updateChild
framework.dart:3686
#73     SingleChildRenderObjectElement.update
framework.dart:6442
#74     Element.updateChild
framework.dart:3686
#75     ComponentElement.performRebuild
framework.dart:5111
#76     Element.rebuild
framework.dart:4805
#77     StatelessElement.update
framework.dart:5162
#78     Element.updateChild
framework.dart:3686
#79     RenderObjectElement.updateChildren
framework.dart:6093
#80     MultiChildRenderObjectElement.update
framework.dart:6595
#81     Element.updateChild
framework.dart:3686
#82     RenderObjectElement.updateChildren
framework.dart:6093
#83     MultiChildRenderObjectElement.update
framework.dart:6595
#84     Element.updateChild
framework.dart:3686
#85     SingleChildRenderObjectElement.update
framework.dart:6442
#86     Element.updateChild
framework.dart:3686
#87     ComponentElement.performRebuild
framework.dart:5111
#88     StatefulElement.performRebuild
framework.dart:5251
#89     Element.rebuild
framework.dart:4805
#90     StatefulElement.update
framework.dart:5274
#91     Element.updateChild
framework.dart:3686
#92     ComponentElement.performRebuild
framework.dart:5111
#93     StatefulElement.performRebuild
framework.dart:5251
#94     Element.rebuild
framework.dart:4805
#95     StatefulElement.update
framework.dart:5274
#96     Element.updateChild
framework.dart:3686
#97     SingleChildRenderObjectElement.update
framework.dart:6442
#98     Element.updateChild
framework.dart:3686
#99     SingleChildRenderObjectElement.update
framework.dart:6442
#100    Element.updateChild
framework.dart:3686
#101    ComponentElement.performRebuild
framework.dart:5111
#102    StatefulElement.performRebuild
framework.dart:5251
#103    Element.rebuild
framework.dart:4805
#104    StatefulElement.update
framework.dart:5274
#105    Element.updateChild
framework.dart:3686
#106    ComponentElement.performRebuild
framework.dart:5111
#107    Element.rebuild
framework.dart:4805
#108    StatelessElement.update
framework.dart:5162
#109    Element.updateChild
framework.dart:3686
#110    ComponentElement.performRebuild
framework.dart:5111
#111    StatefulElement.performRebuild
framework.dart:5251
#112    Element.rebuild
framework.dart:4805
#113    BuildOwner.buildScope
framework.dart:2780
#114    WidgetsBinding.drawFrame
binding.dart:903
#115    RendererBinding._handlePersistentFrameCallback
binding.dart:358
#116    SchedulerBinding._invokeFrameCallback
binding.dart:1284
#117    SchedulerBinding.handleDrawFrame
binding.dart:1214
#118    SchedulerBinding._handleDrawFrame
binding.dart:1072
#119    _invoke (dart:ui/hooks.dart:142:13)
#120    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:359:5)
#121    _drawFrame (dart:ui/hooks.dart:112:31)
(elided 2 frames from class _AssertionError)

@jagadishnallappa
Copy link

Is this error fixed? Has anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants