openimsdk / open-im-flutter-demo

Demo developed based on flutter open IM SDK.
https://openim.io
Apache License 2.0
296 stars 202 forks source link

[BUG] Clicking to initiate a voice call during a group chat causes the page to crash #114

Closed q80671428 closed 2 weeks ago

q80671428 commented 1 month ago

OpenIM Server Version

DEMO:V3.5.1 SDK:3.8.0

Operating System and CPU Architecture

macOS (ARM)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

void call() { if (rtcIsBusy) { IMViews.showToast(StrRes.callingBusy); return; }

IMViews.openIMCallSheet(nickname.value, (index) {
  imLogic.call(
    callObj: CallObj.single,
    callType: index == 0 ? CallType.audio : CallType.video,
    inviteeUserIDList: [if (isSingleChat) userID!],
  );
});

}

When calling the call method, inviteUserIDList is empty, causing the crash at: Future toggle(ToggleMessage msg) async { const String pigeon_channelName = 'dev.flutter.pigeon.wakelock_plus_platform_interface.WakelockPlusApi.toggle'; final BasicMessageChannel<Object?> pigeon_channel = BasicMessageChannel<Object?>( pigeon_channelName, pigeonChannelCodec, binaryMessenger: __pigeon_binaryMessenger, ); final List<Object?>? pigeon_replyList = await pigeon_channel.send(<Object?>[msg]) as List<Object?>?; if (pigeon_replyList == null) { **throw _createConnectionError(pigeon_channelName);** } else if (pigeon_replyList.length > 1) { throw PlatformException( code: pigeon_replyList[0]! as String, message: __pigeon_replyList[1] as String?, details: pigeon_replyList[2], ); } else { return; } }

Screenshots Link

1

std-s commented 1 month ago

Hi, the open source version only has basic single chat audio and video.