flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
321 stars 249 forks source link

Null Exception Error: Challenges with DTMF Tones in Video Calls versus Seamless Audio Performance #423

Open krishnaneeldeva opened 5 months ago

krishnaneeldeva commented 5 months ago

Describe the bug A clear and concise description of what the bug is.

Subject: Error in Video Call - Null Pointer Exception During DTMF Tone Transmission

Description:

When attempting to make a video call using the application, a null pointer exception is thrown during the process of sending DTMF tones. This issue is not observed in audio calls, where DTMF tone transmission works as expected.

Error Details:

E/MethodChannel#FlutterWebRTC.Method(24190): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.webrtc.MediaStreamTrack.kind()' on a null object reference E/flutter (24190): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'java.lang.String org.webrtc.MediaStreamTrack.kind()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.webrtc.MediaStreamTrack.kind()' on a null object reference

This error seems to stem from an issue with handling method calls related to WebRTC, particularly when transitioning from audio to video calls. The specific error message indicates a null object reference within the org.webrtc.MediaStreamTrack class.

Request for Assistance:

I kindly request assistance in addressing this null pointer exception during video calls. The application successfully handles audio calls and DTMF tone transmission, but encounters issues when transitioning to video calls.

If further details or code snippets are

required for analysis, please let me know. Thank you for your support.

krishnaneeldeva commented 5 months ago

Update: It is working fine if we request camera permission from user.

Subject: Request for Improvement: Decoupling Camera Permission from DTMF Tone Transmission

Description:

Update: During my recent work involving a doorbell application, I encountered a scenario where camera permission was required for sending DTMF tones. However, considering the nature of the application (doorbell functionality), the need for camera permission seemed unnecessary.

Request: I propose an improvement in the implementation where the requirement for camera permission is decoupled from the process of sending DTMF tones. In cases like this, where camera functionality is not directly related to the task at hand, it would be beneficial to avoid requesting unnecessary permissions. This adjustment could enhance the user experience by minimizing permission requests for unrelated functionalities.

Thank you for considering this request. If further clarification or details are needed, please let me know.

lineaira commented 1 week ago

I've found this issue to be related to flutter-webrtc/flutter-webrtc packag, opened an issue there, and submitted a PR for this: Issue: Issue 1611 PR: PR 1612