MuhammadDaniyal32 / Linphone-Flutter-Plugin

MIT License
0 stars 0 forks source link

App crashes #1

Open sicunets opened 2 days ago

sicunets commented 2 days ago

I was trying to check with example but the app crashed When I clicked on the call button. Can you check the issue, please?

MuhammadDaniyal32 commented 1 day ago

Hi, Please can you provide details of errors your getting , and did you registered with your server before making call.

sicunets commented 1 day ago

Yes i have registered before making call. And registration was ok. Here is the full errors.

I/LinPhoneSDKTest( 917): New MediaSession [0xb40000707f2c9968] initialized (liblinphone version: 5.0.71) I/LinPhoneSDKTest( 917): Media local-ip for streams advertised in SDP: 192.168.1.10 I/LinPhoneSDKTest( 917): Stream indexes selected (-1 = unassigned): mainAudioStreamIndex=0, mainVideoStreamIndex=-1, mainTextStreamIndex=-1 I/LinPhoneSDKTest( 917): Found media local-ip from signaling: 192.168.1.10 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_32 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_80 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_32 I/LinPhoneSDKTest( 917): stream#0 [audio] in state [Stopped]: multicast role is [inactive] I/LinPhoneSDKTest( 917): RtpSession bound to [::0] ports [7078] [7079] W/LinPhoneSDKTest( 917): Fail to increase socket's recv buffer size with SO_RCVBUFFORCE: Operation not permitted. W/LinPhoneSDKTest( 917): Fail to increase socket's send buffer size with SO_SNDBUFFORCE: Operation not permitted. W/LinPhoneSDKTest( 917): Fail to increase socket's recv buffer size with SO_RCVBUFFORCE: Operation not permitted. I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_80 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_CM_128_HMAC_SHA1_32 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_80 I/LinPhoneSDKTest( 917): Configured srtp crypto suite: AES_256_CM_HMAC_SHA1_32 I/LinPhoneSDKTest( 917): Creating ZRTP engine on rtp session [0xb400006e9f2c91b0] ssrc 0x6904440c I/LinPhoneSDKTest( 917): rtp_session_enable_network_simulation:DISABLING NETWORK SIMULATION I/LinPhoneSDKTest( 917): Setting DSCP to 46 for MSAudio stream. I/LinPhoneSDKTest( 917): Created stream#0 [audio] in state [Stopped] I/LinPhoneSDKTest( 917): [ToneManager] stopDtmfStream I/LinPhoneSDKTest( 917): Linphone core [0xb400006f6f30bb80] notified [call_created] I/LinPhoneSDKTest( 917): CallSession [0xb40000707f2c9968] moving from state LinphoneCallIdle to LinphoneCallOutgoingInit I/LinPhoneSDKTest( 917): [Core Manager] First call started W/LinPhoneSDKTest( 917): [Core Manager] Service isn't running, let's start it I/LinPhoneSDKTest( 917): [Core Manager] Starting service org.linphone.core.tools.service.CoreService I/LinPhoneSDKTest( 917): Linphone core [0xb400006f6f30bb80] notified [first_call_started] E/linphonesdk-----------( 917): onCallStateChanged: Outgoing init I/LinPhoneSDKTest( 917): [Core Manager] Outgoing call in progress, no other call, acquire ringing audio focus for ringback I/LinPhoneSDKTest( 917): [Audio Helper] Ringing audio focus request granted I/LinPhoneSDKTest( 917): Linphone core [0xb400006f6f30bb80] notified [call_state_changed] I/LinPhoneSDKTest( 917): [MS2AudioStream] setting type of soundcard 0xb400006f4f302ef0 to voice I/LinPhoneSDKTest( 917): [MS2AudioStream] setting type of soundcard 0xb400006f4f302470 to voice I/LinPhoneSDKTest( 917): [ToneManager] stopDtmfStream I/LinPhoneSDKTest( 917): ICE state is IceStateNotActivated for stream#0 [audio] in state [Stopped] I/LinPhoneSDKTest( 917): Contact has been fixed using proxy I/LinPhoneSDKTest( 917): Setting contact address for session 0xb40000703f2edca0 to sip:104@192.168.1.10:43897;expires=3599 I/LinPhoneSDKTest( 917): [sip:104@192.168....] calling [sip:105@192.168.1...] on op [0xb400006e5f39f030] I/LinPhoneSDKTest( 917): Skipping top route of initial route-set because same as request-uri I/LinPhoneSDKTest( 917): bellesip_wake_lock_acquire(): Android wake lock [belle-sip transaction(0xb400006e7f3074b0)] acquired [ref=0x4646] I/LinPhoneSDKTest( 917): bellesip_wake_lock_acquire(): cast long of wakelock 17990 I/LinPhoneSDKTest( 917): transaction [0xb400006e7f3074b0]: starting transaction background task with id=[4646]. I/LinPhoneSDKTest( 917): Changing [client] [INVITE] transaction [0xb400006e7f3074b0], from state [INIT] to [CALLING] I/LinPhoneSDKTest( 917): channel [0xb40000700f3ab0d0]: message sent to [UDP://192.168.1...:5060], size: [1448] bytes I/LinPhoneSDKTest( 917): INVITE sip:105@192.168.1... SIP/2.0 I/LinPhoneSDKTest( 917): Via: SIP/2.0/UDP 192.168.1.10:43897;branch=z9hG4bK.3c~8s0lt2;rport I/LinPhoneSDKTest( 917): From: sip:104@192.168.1...;tag=IajjH6VBC I/LinPhoneSDKTest( 917): To: sip:105@192.168.1.... I/LinPhoneSDKTest( 917): CSeq: 20 INVITE I/LinPhoneSDKTest( 917): Call-ID: wgKE8F~Jt3 I/LinPhoneSDKTest( 917): Max-Forwards: 70 I/LinPhoneSDKTest( 917): Supported: replaces, outbound, gruu I/LinPhoneSDKTest( 917): Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE I/LinPhoneSDKTest( 917): Content-Type: application/sdp I/LinPhoneSDKTest( 917): Content-Length: 877 I/LinPhoneSDKTest( 917): Contact: sip:104@192.168.1.10:43897;transport=udp;expires=3599;+sip.instance="" I/LinPhoneSDKTest( 917): User-Agent: Unknown I/LinPhoneSDKTest( 917): I/LinPhoneSDKTest( 917): v=0 I/LinPhoneSDKTest( 917): o=104 2251 3407 IN IP4 192.168.1.10 I/LinPhoneSDKTest( 917): s=Talk I/LinPhoneSDKTest( 917): c=IN IP4 192.168.1.10 I/LinPhoneSDKTest( 917): t=0 0 I/LinPhoneSDKTest( 917): a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics I/LinPhoneSDKTest( 917): m=audio 7078 RTP/SAVP 96 97 98 0 8 101 99 100 I/LinPhoneSDKTest( 917): a=rtpmap:96 opus/48000/2 I/LinPhoneSDKTest( 917): a=fmtp:96 useinbandfec=1 I/LinPhoneSDKTest( 917): a=rtpmap:97 speex/16000 I/LinPhoneSDKTest( 917): a=fmtp:97 vbr=on I/LinPhoneSDKTest( 917): a=rtpmap:98 speex/8000 I/LinPhoneSDKTest( 917): a=fmtp:98 vbr=on I/LinPhoneSDKTest( 917): a=rtpmap:101 telephone-event/48000 I/LinPhoneSDKTest( 917): a=rtpmap:99 telephone-event/16000 I/LinPhoneSDKTest( 917): a=rtpmap:100 telephone-event/8000 I/LinPhoneSDKTest( 917): a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:yX2XO161LlT9yiaRwmDLm2gP/J0HYKomzp+KRHTF I/LinPhoneSDKTest( 917): a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:Kby+nzstyGTewZ6jmh9uywLh+DEFhRVJe8DcLMrs I/LinPhoneSDKTest( 917): a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:bG2om1hITxgFnZd+UllquwcD+stIg5CGGm/fN3jgLSRAMAI8eiuzZfuYNBOvgA== I/LinPhoneSDKTest( 917): a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:4A/MmQ85ljoShrFj+UgWAsC0yGeNgodWpdhruRtjbPw16tAjYvwYGRpuNenKbg== I/LinPhoneSDKTest( 917): a=rtcp-fb: trr-int 1000 I/LinPhoneSDKTest( 917): a=rtcp-fb: ccm tmmbr I/LinPhoneSDKTest( 917): I/LinPhoneSDKTest( 917): CallSession [0xb40000707f2c9968] moving from state LinphoneCallOutgoingInit to LinphoneCallOutgoingProgress E/linphonesdk-----------( 917): onCallStateChanged: Outgoing Progress I/LinPhoneSDKTest( 917): Linphone core [0xb400006f6f30bb80] notified [call_state_changed] I/LinPhoneSDKTest( 917): [Core Service] Android >= 8.0 detected, creating notification channel I/LinPhoneSDKTest( 917): [Core Service] Core Manager found, adding our listener I/LinPhoneSDKTest( 917): Core callbacks [0xb400006f4f31bf70] registered on core [0xb400006f6f30bb80] W/LinPhoneSDKTest( 917): [Core Service] Service started while at least one call active ! I/LinPhoneSDKTest( 917): [Core Service] Starting service as foreground D/AndroidRuntime( 917): Shutting down VM E/AndroidRuntime( 917): FATAL EXCEPTION: main E/AndroidRuntime( 917): Process: com.example.linphone_flutter_plugin_example, PID: 917 E/AndroidRuntime( 917): java.lang.RuntimeException: Unable to create service org.linphone.core.tools.service.CoreService: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{6ba6149 917:com.example.linphone_flutter_plugin_example/u0a386} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MICROPHONE] any of the permissions allOf=false [android.permission.CAPTURE_AUDIO_HOTWORD, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CAPTURE_MEDIA_OUTPUT, android.permission.CAPTURE_TUNER_AUDIO_INPUT, android.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO] and the app must be in the eligible state/exemptions to access the foreground only permission E/AndroidRuntime( 917): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4808) E/AndroidRuntime( 917): at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0) E/AndroidRuntime( 917): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2388) E/AndroidRuntime( 917): at android.os.Handler.dispatchMessage(Handler.java:111) E/AndroidRuntime( 917): at android.os.Looper.loopOnce(Looper.java:242) E/AndroidRuntime( 917): at android.os.Looper.loop(Looper.java:362) E/AndroidRuntime( 917): at android.app.ActivityThread.main(ActivityThread.java:8448) E/AndroidRuntime( 917): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 917): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/AndroidRuntime( 917): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:992) E/AndroidRuntime( 917): Caused by: java.lang.SecurityException: Starting FGS with type microphone callerApp=ProcessRecord{6ba6149 917:com.example.linphone_flutter_plugin_example/u0a386} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MICROPHONE] any of the permissions allOf=false [android.permission.CAPTURE_AUDIO_HOTWORD, android.permission.CAPTURE_AUDIO_OUTPUT, android.permission.CAPTURE_MEDIA_OUTPUT, android.permission.CAPTURE_TUNER_AUDIO_INPUT, android.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT, android.permission.RECORD_AUDIO] and the app must be in the eligible state/exemptions to access the foreground only permission E/AndroidRuntime( 917): at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) E/AndroidRuntime( 917): at android.os.Parcel.createException(Parcel.java:3041) E/AndroidRuntime( 917): at android.os.Parcel.readException(Parcel.java:3024) E/AndroidRuntime( 917): at android.os.Parcel.readException(Parcel.java:2966) E/AndroidRuntime( 917): at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7163) E/AndroidRuntime( 917): at android.app.Service.startForeground(Service.java:775) E/AndroidRuntime( 917): at org.linphone.core.tools.service.CoreService.showForegroundServiceNotification(CoreService.java:226) E/AndroidRuntime( 917): at org.linphone.core.tools.service.CoreService.startForeground(CoreService.java:238) E/AndroidRuntime( 917): at org.linphone.core.tools.service.CoreService.onCreate(CoreService.java:129) E/AndroidRuntime( 917): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4795) E/AndroidRuntime( 917): ... 9 more E/AndroidRuntime( 917): Caused by: android.os.RemoteException: Remote stack trace: E/AndroidRuntime( 917): at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:2625) E/AndroidRuntime( 917): at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2336) E/AndroidRuntime( 917): at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1693) E/AndroidRuntime( 917): at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:13749) E/AndroidRuntime( 917): at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3515)

sicunets commented 23 hours ago

I am not sure but maybe this issue is getting for this error. After opening the app before allowing permissions its takes permissions.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Error on request permission. PlatformException(Permission Error, Permission is not granted., Error, null) E/flutter (16402): #0 LinphoneFlutterPlugin.requestPermissions (package:linphone_flutter_plugin/linphoneflutterplugin.dart:19:7) E/flutter (16402):