AgoraIO-Community / Agora-Flutter-Quickstart

Quickstart guide for the Agora Flutter SDK(Android/iOS)
MIT License
509 stars 192 forks source link

Extra Positional Arguments - configuration.dimensions = VideoDimensions(1920, 1080) #236

Closed cachecake404 closed 3 years ago

cachecake404 commented 3 years ago

The application fails to run due to the following error:

  Error: Too many positional arguments: 0 allowed, but 2 found.
  Try removing the extra positional arguments.
      configuration.dimensions = VideoDimensions(1920, 1080);

The solution was to comment out Line 62 in pages/call.dart

    await _engine.enableWebSdkInteroperability(true);
    VideoEncoderConfiguration configuration = VideoEncoderConfiguration();
    //configuration.dimensions = VideoDimensions(1920, 1080);
    await _engine.setVideoEncoderConfiguration(configuration);
    await _engine.joinChannel(Token, widget.channelName!, null, 0);

Fixing this I can run the application then join video with a channel name as a broadcaster or audience but then I get a token error

I/flutter ( 7410): PermissionStatus.granted
I/flutter ( 7410): PermissionStatus.granted
D/agora-jni( 7410): android bridge create done...
E/libc    ( 7410): Access denied finding property "net.dns1"
E/libc    ( 7410): Access denied finding property "net.dns2"
E/libc    ( 7410): Access denied finding property "net.dns3"
E/libc    ( 7410): Access denied finding property "net.dns4"
E/libc    ( 7410): Access denied finding property "net.dns1"
E/libc    ( 7410): Access denied finding property "net.dns2"
E/libc    ( 7410): Access denied finding property "net.dns3"
E/libc    ( 7410): Access denied finding property "net.dns4"
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xf521f810, tid 7593
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 7410): eglCreateContext: 0xb0cc02b0: maj 2 min 0 rcv 2
D/EGL_emulation( 7410): eglMakeCurrent: 0xb0cc02b0: ver 2 0 (tinfo 0xb7bb4490) (first time)
E/EGL_emulation( 7410): eglQueryContext 32c0  EGL_BAD_ATTRIBUTE
E/EGL_emulation( 7410): tid 7593: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/AGORA_SDK( 7410): Surface changed to width 1080 height 1183
D/BluetoothHeadset( 7410): Proxy object connected
E/libc    ( 7410): Access denied finding property "net.dns1"
E/libc    ( 7410): Access denied finding property "net.dns2"
E/libc    ( 7410): Access denied finding property "net.dns3"
E/libc    ( 7410): Access denied finding property "net.dns4"
D/EglBase14( 7410): SDK version: 30. isEGL14Supported: true
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xb0cc2fc0, tid 7574
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 7410): eglCreateContext: 0xb0cc2930: maj 2 min 0 rcv 2
D/*WEBRTCN*( 7410): SetRenderAndroidVM
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xb0cc2700, tid 7598
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
W/GDPGlUtil( 7410): unable to find RGB8888 / 3 EGLConfig
D/EGL_emulation( 7410): eglCreateContext: 0xb0cc39d0: maj 2 min 0 rcv 2
D/GDPGlUtil( 7410): EGLContext created, client version 2
D/EGL_emulation( 7410): eglMakeCurrent: 0xb0cc39d0: ver 2 0 (tinfo 0xc1eedd90) (first time)
I/GDPAndroid( 7410): cores:8
I/chatty  ( 7410): uid=10157(com.example.agoraflutterquickstart) GENP.0 identical 8 lines
I/GDPAndroid( 7410): cores:8
I/GDPAndroid( 7410): max freq:2
I/GDPAndroid( 7410): total mem:2076045312
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xb0cc4290, tid 7601
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 7410): eglCreateContext: 0xb0cc44c0: maj 2 min 0 rcv 2
D/EGL_emulation( 7410): eglMakeCurrent: 0xb0cc44c0: ver 2 0 (tinfo 0xb2f54910) (first time)
E/EGL_emulation( 7410): eglQueryContext 32c0  EGL_BAD_ATTRIBUTE
E/EGL_emulation( 7410): tid 7601: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/AGORA_SDK( 7410): Surface changed to width 1080 height 1219
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xb0cc58e0, tid 7602
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 7410): eglCreateContext: 0xb0cc19e0: maj 2 min 0 rcv 2
D/EGL_emulation( 7410): eglMakeCurrent: 0xb0cc19e0: ver 2 0 (tinfo 0xb7bb48d0) (first time)
E/EGL_emulation( 7410): eglQueryContext 32c0  EGL_BAD_ATTRIBUTE
E/EGL_emulation( 7410): tid 7602: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/AGORA_SDK( 7410): Surface changed to width 1080 height 1868
W/System.err( 7410): java.io.FileNotFoundException: /sys/class/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/System.err( 7410): java.io.FileNotFoundException: /sys/devices/virtual/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/GENP.0  ( 7410): type=1400 audit(0.0:278): avc: denied { read } for name="temp" dev="sysfs" ino=19213 scontext=u:r:untrusted_app_27:s0:c157,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app=com.example.agoraflutterquickstart
W/System.err( 7410): java.io.FileNotFoundException: /sys/class/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/System.err( 7410): java.io.FileNotFoundException: /sys/devices/virtual/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/GENP.0  ( 7410): type=1400 audit(0.0:280): avc: denied { read } for name="temp" dev="sysfs" ino=19213 scontext=u:r:untrusted_app_27:s0:c157,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app=com.example.agoraflutterquickstart
E/libc    ( 7410): Access denied finding property "net.dns1"
E/libc    ( 7410): Access denied finding property "net.dns2"
E/libc    ( 7410): Access denied finding property "net.dns3"
E/libc    ( 7410): Access denied finding property "net.dns4"
W/System.err( 7410): java.io.FileNotFoundException: /sys/class/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/System.err( 7410): java.io.FileNotFoundException: /sys/devices/virtual/thermal/thermal_zone0/temp: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err( 7410):    at java.io.FileInputStream.<init>(FileInputStream.java:160)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.readOneLine(GDPAndroid.java:383)
W/System.err( 7410):    at io.agora.rtc.gdp.GDPAndroid.getCpuTemperature(GDPAndroid.java:362)
W/System.err( 7410): Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
W/System.err( 7410):    at libcore.io.Linux.open(Native Method)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err( 7410):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err( 7410):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7542)
W/System.err( 7410):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err( 7410):    ... 3 more
W/GENP.0  ( 7410): type=1400 audit(0.0:282): avc: denied { read } for name="temp" dev="sysfs" ino=19213 scontext=u:r:untrusted_app_27:s0:c157,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app=com.example.agoraflutterquickstart
W/GENP.0  ( 7410): type=1400 audit(0.0:283): avc: denied { read } for name="temp" dev="sysfs" ino=19213 scontext=u:r:untrusted_app_27:s0:c157,c256,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 app=com.example.agoraflutterquickstart
E/libc    ( 7410): Access denied finding property "net.dns1"
E/libc    ( 7410): Access denied finding property "net.dns2"
E/libc    ( 7410): Access denied finding property "net.dns3"
E/libc    ( 7410): Access denied finding property "net.dns4"
W/IInputConnectionWrapper( 7410): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7410): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper( 7410): setComposingRegion on inactive InputConnection
D/HostConnection( 7410): HostConnection::get() New Host Connection established 0xf520f190, tid 7606
D/HostConnection( 7410): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 7410): eglCreateContext: 0xf522b430: maj 2 min 0 rcv 2
D/EGL_emulation( 7410): eglMakeCurrent: 0xf522b430: ver 2 0 (tinfo 0xb7b9a3d0) (first time)
E/EGL_emulation( 7410): eglQueryContext 32c0  EGL_BAD_ATTRIBUTE
E/EGL_emulation( 7410): tid 7606: eglQueryContext(2019): error 0x3004 (EGL_BAD_ATTRIBUTE)
I/AGORA_SDK( 7410): Surface changed to width 1080 height 1822
E/BufferQueueProducer( 7410): [SurfaceTexture-0-7410-10](id:1cf20000000a,api:1,p:386,c:7410) dequeueBuffer: BufferQueue has been abandoned
D/*WEBRTCN*( 7410): SetRenderAndroidVM

What is required to fix this? Why does the project have the positional error by default?

LichKing-2234 commented 3 years ago

Pls refer to our doc or our example. https://docs.agora.io/en/Video/release_flutter_video?platform=Flutter#videodimension