QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 359 forks source link

iOS app crash when call from flutter app - [__NSCFConstantString count]: unrecognized selector sent to instance 0x104a6bc10 #1354

Closed aakash-patel-dev closed 1 year ago

aakash-patel-dev commented 1 year ago

New Issue Checklist

Environment details for ios

Info Value
min iOS Version e.g. 12.1
Quickblox iOS SDK version e.g. 2.19.0
QuickbloxWebRTC SDK version e.g. 2.8.1
Xcode Version e.g. Xcode 14.3
Repro with our demo sample e.g. does it happen with our demo sample?

Environment details for Flutter

Info Value
min iOS Version e.g. 13
Quickblox iOS SDK version e.g. 2.19.0
QuickbloxWebRTC SDK version e.g. 2.8.1
Xcode Version e.g. Xcode 14.1
Repro with our demo sample e.g. does it happen with our demo sample?

Did this work before?

Flutter Pub quickblox_sdk: ^0.12.4

Expected behavior

  1. iOS user can connect a call to Flutter user also Flutter user can connect a call to iOS App user

Actual behavior

  1. Audio call can't connect from iOS App to Flutter App.
  2. Audio call connected from flutter to ios app but iOS app crash when call ended.
  3. Video call connected but ios App crashed when Video Call ended.

Logs

Please use the following template for logs:

To enable full logs use the following code:

[QBSettings setLogLevel:QBLogLevelDebug];
[QBSettings enableXMPPLogging];
iOS App Crashed Report ```logos // Your logs here 2023-07-31 12:44:19.460 rtc::[Signaling Processor] - Did receive signal: iceCandidates from: 137912221 2023-07-31 12:44:19.460697+0530 Text Me[14920:881325] -[__NSCFConstantString count]: unrecognized selector sent to instance 0x104a6bc10 2023-07-31 12:44:19.463024+0530 Text Me[14920:881325] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x104a6bc10' *** First throw call stack: (0x180d9bd1c 0x1985c0ee4 0x180e6c75c 0x180d3561c 0x180d3482c 0x1851b45e4 0x100511828 0x180d29dd0 0x180d45ea8 0x180d7a2cc 0x1049ea9c4 0x104164700 0x104165fc8 0x1041748ac 0x1041744fc 0x180d570d4 0x180d145f8 0x180d27250 0x1a1856988 0x183529a88 0x1832c2fc8 0x1006e47bc 0x1013484d0) 2023-07-31 12:44:19.463 rtc::[PCON]<137912221, R:Offer> Signaling state STABLE 2023-07-31 12:44:19.476 rtc::[QBRTCAudioSession] Did start play or record. libc++abi: terminating with uncaught exception of type NSException dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/usr/lib/libMTLCapture.dylib *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x104a6bc10' terminating with uncaught exception of type NSException ```

Steps to reproduce the behavior 1) we are using same quickblox Application credentials for different platform(iOS and Flutter). 2)Firstly, I created one QuickBlox user from the iOS app and another one from the Flutter app. Then, I initiated a call to the user-generated from the Flutter app, but when the Flutter user accepted the call, the iOS app crashed.

Any others comments @soulfly @muteKey @Forsarion @iSevenDays @Nightstep

VladimirNybozhinsky commented 1 year ago

@aakash-patel-dev Hi This is Vladimir from QuickBlox.

"2)Firstly, I created one QuickBlox user from the iOS app and another one from the Flutter app. Then, I initiated a call to the user-generated from the Flutter app, but when the Flutter user accepted the call, the iOS app crashed."

Please specify from which platform the call was initiated and who received it - from IOS_Flutter to IOS_Native?

I did such a test on our samples, such IOS Videochat as Flutter Simple-sample. Called from Flutter to IOS. The problem you described did not reproduce and everything worked correctly. Try to test the problem on our samples. Best regards, Vladimir

VladimirNybozhinsky commented 1 year ago

https://github.com/QuickBlox/quickblox-ios-sdk/assets/43746573/b831e260-abd8-44c6-8d07-7b4624722c7f

This is a video confirmation of the test. On the device, Native IOS Video Chat is installed on the left and Flutter Simple-sample is on the right. On the video, there are several video-audio calls that Flutter initiates. The IOS user accepts them without a crash and calls are also terminated without crashing applications. Best regards, Vladimir

aakash-patel-dev commented 1 year ago

@VladimirNybozhinsky, Thanks for sharing information But This issue is resolved The issue is occurred due to mismatched data passing, in iOS we are not passing the "userInfo" but the Flutter iOS app the default value of "userInfo" is used. Screenshot 2023-08-07 at 3 17 43 PM

VladimirNybozhinsky commented 1 year ago

I'm glad that you solved the problem) With best wishes, Vladimir.

On Mon, Aug 7, 2023 at 12:50 PM aakash-patel-dev @.***> wrote:

@VladimirNybozhinsky https://github.com/VladimirNybozhinsky, Thanks for sharing information But This issue is resolved The issue is occurred due to mismatched data passing, in iOS we are not passing the "userInfo" but the Flutter iOS app the default value of "userInfo" is used. [image: Screenshot 2023-08-07 at 3 17 43 PM] https://user-images.githubusercontent.com/75755337/258765593-e1484cc4-00cd-43b3-a3c8-651ad593ed9f.png

— Reply to this email directly, view it on GitHub https://github.com/QuickBlox/quickblox-ios-sdk/issues/1354#issuecomment-1667547884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNYKDK3FPOTZCRS53SNPGTXUC255ANCNFSM6AAAAAA256XRBQ . You are receiving this because you were mentioned.Message ID: @.***>