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

[Web] Error with onAudioVolumeIndication event deserialization #1840

Open
1 of 5 tasks
dannnnthemannnn opened this issue Jun 13, 2024 · 6 comments
Open
1 of 5 tasks
Labels
bug Something isn't working keep track platform-web

Comments

@dannnnthemannnn
Copy link

dannnnthemannnn commented Jun 13, 2024

Version of the agora_rtc_engine

6.3.2

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

  1. Turn on AudioVolumeIndication await engine.enableAudioVolumeIndication(interval: 200, smooth: 3, reportVad: true);
  2. See that it fails due to deserialization issues

Expected results

It sends volume indication events properly

Actual results

It fails

Code sample

Code sample
await engine.enableAudioVolumeIndication(interval: 200, smooth: 3, reportVad: true);

Screenshots or Video

Screenshots / Video demonstration

N/A

Logs

Logs
Error
    at Object.throw_ [as throw] (errors.dart:296:3)
    at Object._failedAsCheck (rti.dart:1388:3)
    at dart_rti.Rti.new._generalNullableAsCheckImplementation (rti.dart:1378:3)
    at Object._$36RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson [as _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson] (event_handler_param_json.g.dart:1446:45)
    at RtcEngineEventHandlerOnAudioVolumeIndicationJson.fromJson (event_handler_param_json.dart:1673:7)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEventInternal (agora_rtc_engine_event_impl.dart:153:62)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEvent (agora_rtc_engine_event_impl.dart:1914:9)
    at iris_method_channel.dart:64:20
    at [_onEventFromJS] (iris_method_channel_internal_web.dart:98:34)
    at Object._checkAndCall (operations.dart:426:37)
    at Object.dcall (operations.dart:431:39)
    at o.ret [as _eventHandler] (js_allow_interop_patch.dart:17:11)
    at o.onEvent (iris-web-rtc.js:2:892986)
    at iris-web-rtc.js:2:893907
    at Array.forEach (<anonymous>)
    at t.IrisEventHandlerManagerImpl.notifyEvent (iris-web-rtc.js:2:893892)
    at t.IRtcEngineEventHandler.notifyEvent (iris-web-rtc.js:2:932897)
    at t.IRtcEngineEventHandler.onAudioVolumeIndication_781482a (iris-web-rtc.js:2:953309)
    at iris-web-rtc.js:2:1139732

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.1.1 23B81 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS (Xcode 15.4)
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on
        the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.84.2)
[✓] VS Code (version 1.90.0-insider)
@dannnnthemannnn
Copy link
Author

@littleGnAl
Copy link
Collaborator

@dannnnthemannnn Thanks for your report, can you also share the log of this callback (there should be an event name and JSON data of this callback in the log), so we can check what we get from the JS side.

@littleGnAl littleGnAl added waiting for customer response waiting for customer response, or closed by no-reponse bot bug Something isn't working platform-web labels Jun 13, 2024
@littleGnAl littleGnAl added keep track and removed waiting for customer response waiting for customer response, or closed by no-reponse bot labels Jun 24, 2024
@dannnnthemannnn
Copy link
Author

Hello @littleGnAl Where would I find those logs on web? I see for the other platforms the defualt log locations:

Android: /storage/emulated/0/Android/data//files/agora-iris.log
iOS: App Sandbox/Library/caches/agora-iris.log
macOS: /Users//Library/Containers//Data/Library/Logs/agora-iris.log
Windows: C:\Users<user_name>\AppData\Local\Agora<process_name>\agora-iris.log

I dont see a log file at /Users//Library/Containers//Data/Library/Logs/agora-iris.log on my mac.

@littleGnAl
Copy link
Collaborator

On the web, this log only outputs to the console.

@dannnnthemannnn
Copy link
Author

@littleGnAl Unfortunately it seems like the log is not outputting the raw JSON that is failing to parse or anything:

iris-web-rtc.js:2 [4:03:10 PM:545][Iris log]:[callIrisApiAsync][result] RtcEngine_enableAudioVolumeIndication_39794a0 ret 0
iris-web-rtc.js:1 16:03:10:659 Agora-SDK [DEBUG]: [lock-P2PConnection-mutex-10] is not locked, current queue 0. From P2PConnection.connect
iris-web-rtc.js:1 16:03:10:660 Agora-SDK [DEBUG]: [lock-P2PChannel-mutex-9] is not locked, current queue 0. From P2PChannel.connect
iris-web-rtc.js:1 16:03:10:680 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onICEConnectionStateChange(checking)
iris-web-rtc.js:1 16:03:10:681 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onICETransportStateChange(checking)
iris-web-rtc.js:1 16:03:10:683 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onConnectionStateChange(connecting)
errors.dart:296 Uncaught Error
    at Object.throw_ [as throw] (errors.dart:296:3)
    at Object._failedAsCheck (rti.dart:1388:3)
    at dart_rti.Rti.new._generalNullableAsCheckImplementation (rti.dart:1378:3)
    at Object._$36RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson [as _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson] (event_handler_param_json.g.dart:1446:45)
    at RtcEngineEventHandlerOnAudioVolumeIndicationJson.fromJson (event_handler_param_json.dart:1673:7)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEventInternal (agora_rtc_engine_event_impl.dart:153:62)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEvent (agora_rtc_engine_event_impl.dart:1914:9)
    at iris_method_channel.dart:64:20
    at [_onEventFromJS] (iris_method_channel_internal_web.dart:98:34)
    at Object._checkAndCall (operations.dart:426:37)
    at Object.dcall (operations.dart:431:39)
    at o.ret [as _eventHandler] (js_allow_interop_patch.dart:17:11)
    at o.onEvent (iris-web-rtc.js:2:892986)
    at iris-web-rtc.js:2:893907
    at Array.forEach (<anonymous>)
    at t.IrisEventHandlerManagerImpl.notifyEvent (iris-web-rtc.js:2:893892)
    at t.IRtcEngineEventHandler.notifyEvent (iris-web-rtc.js:2:932897)
    at t.IRtcEngineEventHandler.onAudioVolumeIndication_781482a (iris-web-rtc.js:2:953309)
    at iris-web-rtc.js:2:1139732
iris-web-rtc.js:1 16:03:10:772 Agora-SDK [INFO]: [client-73ece] [pc-1] selectedcandidatepairchange: local {"candidateType":"prflx","protocol":"udp"}, remote {"candidateType":"host","protocol":"udp","address":"128.1.193.201","port":4710} )
iris-web-rtc.js:1 16:03:10:772 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onDTLSTransportStateChange(connecting)
iris-web-rtc.js:1 16:03:10:772 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onICEConnectionStateChange(connected)
iris-web-rtc.js:1 16:03:10:773 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onICETransportStateChange(connected)
iris-web-rtc.js:1 16:03:10:773 Agora-SDK [DEBUG]: [client-73ece] [pc-1] local candidate count 6
iris-web-rtc.js:1 16:03:10:859 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onDTLSTransportStateChange(connected)
iris-web-rtc.js:1 16:03:10:862 Agora-SDK [INFO]: [client-73ece] [p2pId: 1]: P2PConnection.onConnectionStateChange(connected)
errors.dart:296 Uncaught Error
    at Object.throw_ [as throw] (errors.dart:296:3)
    at Object._failedAsCheck (rti.dart:1388:3)
    at dart_rti.Rti.new._generalNullableAsCheckImplementation (rti.dart:1378:3)
    at Object._$36RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson [as _$RtcEngineEventHandlerOnAudioVolumeIndicationJsonFromJson] (event_handler_param_json.g.dart:1446:45)
    at RtcEngineEventHandlerOnAudioVolumeIndicationJson.fromJson (event_handler_param_json.dart:1673:7)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEventInternal (agora_rtc_engine_event_impl.dart:153:62)
    at agora_rtc_engine_event_impl.RtcEngineEventHandlerWrapper.new.handleEvent (agora_rtc_engine_event_impl.dart:1914:9)
    at iris_method_channel.dart:64:20
    at [_onEventFromJS] (iris_method_channel_internal_web.dart:98:34)
    at Object._checkAndCall (operations.dart:426:37)
    at Object.dcall (operations.dart:431:39)
    at o.ret [as _eventHandler] (js_allow_interop_patch.dart:17:11)
    at o.onEvent (iris-web-rtc.js:2:892986)
    at iris-web-rtc.js:2:893907
    at Array.forEach (<anonymous>)
    at t.IrisEventHandlerManagerImpl.notifyEvent (iris-web-rtc.js:2:893892)
    at t.IRtcEngineEventHandler.notifyEvent (iris-web-rtc.js:2:932897)
    at t.IRtcEngineEventHandler.onAudioVolumeIndication_781482a (iris-web-rtc.js:2:953309)

@cbj0hns0n
Copy link

cbj0hns0n commented Aug 12, 2024

Hi @littleGnAl, @dannnnthemannnn suggested a fix in a comment above that resolved this issue. I searched for the contributing guide for Web and didn't see it yet. What is the process like for merging the proposes changes above?

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

No branches or pull requests

3 participants