connectycube-flutter-call-kit
connectycube-flutter-call-kit copied to clipboard
IOS getting crash
IOS gettting crash when using ConnectycubeFlutterCallKit.getLastCallId() (ONLY IOS).
And also call getting below issue when accept and reject.
Unhandled Exception: type '_Uint8ArrayView' is not a subtype of type 'String'
#0 new CallEvent.fromMap (package:connectycube_flutter_call_kit/src/call_event.dart:71:52)
#1 ConnectycubeFlutterCallKit._processEvent (package:connectycube_flutter_call_kit/src/connectycube_flutter_call_kit.dart:258:35)
#2 ConnectycubeFlutterCallKit.initEventsHandler.
https://user-images.githubusercontent.com/43353899/151600184-af70c11a-a7d4-44d8-b012-1fba3130aaa5.mov
only one line is not enough to investigate this issue, provide please full stack trace and steps for reproducing
@sudobrackets could you please provide the full log from starting the app till getting this issue?
Hi @TatankaConCube, I am trying to run the example in the repo, on Android I am getting the call notification just fine for now still haven't tried when the application is killed, but on iOS I am having the same error, could you help me out ?
Logs:
Restarted application in 479ms. flutter: [initEventsHandler] rawData: {args: {user_info: [123, 125], call_type: 0, caller_id: 714, call_opponents: 101, session_id: 14ff14fc-dc64-4961-aa78-b42212ea3e97, caller_name: dadaa}, event: endCall, uuid: 14FF14FC-DC64-4961-AA78-B42212EA3E97} flutter: [CallEvent.fromMap] map: {user_info: [123, 125], call_type: 0, caller_id: 714, call_opponents: 101, session_id: 14ff14fc-dc64-4961-aa78-b42212ea3e97, caller_name: dadaa} [VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: type '_Uint8ArrayView' is not a subtype of type 'String' #0 new CallEvent.fromMap package:connectycube_flutter_call_kit/src/call_event.dart:77 #1 ConnectycubeFlutterCallKit._processEvent package:connectycube_flutter_call_kit/src/connectycube_flutter_call_kit.dart:259 #2 ConnectycubeFlutterCallKit.initEventsHandler.<anonymous closure> package:connectycube_flutter_call_kit/src/connectycube_flutter_call_kit.dart:129 #3 _rootRunUnary (dart:async/zone.dart:1436:47) #4 _CustomZone.runUnary (dart:async/zone.dart:1335:19) #5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7) #6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11) #7 _DelayedData.perform (dart:async/stream_impl.dart:591:14) #8 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11) #9 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7) #10 _rootRun (dart:<…> [log] [ConnectycubeFlutterCallKit][_processEvent] eventData: {args: {user_info: [123, 125], call_type: 0, caller_id: 714, call_opponents: 101, session_id: 14ff14fc-dc64-4961-aa78-b42212ea3e97, caller_name: dadaa}, event: endCall, uuid: 14FF14FC-DC64-4961-AA78-B42212EA3E97} Reloaded 1 of 590 libraries in 377ms.
Code: `import 'package:flutter/material.dart'; import 'dart:async'; import 'package:uuid/uuid.dart'; import 'package:flutter/services.dart'; import 'dart:typed_data';
import 'package:connectycube_flutter_call_kit/connectycube_flutter_call_kit.dart';
Future
Future
void main() { // ConnectycubeFlutterCallKit.onCallRejectedWhenTerminated = // onCallRejectedWhenTerminated; // ConnectycubeFlutterCallKit.onCallAcceptedWhenTerminated = // onCallAcceptedWhenTerminated; runApp(MyApp()); }
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State<MyApp> { String _platformVersion = 'Unknown'; CallEvent callEvent = CallEvent( sessionId: Uuid().v4(), callType: 0, callerId: 714, callerName: 'dadaa', opponentsIds: {101}.toSet(), userInfo: null);
@override void initState() { ConnectycubeFlutterCallKit.instance.init( onCallAccepted: _onCallAccepted, onCallRejected: _onCallRejected, ringtone: 'custom_ringtone', icon: 'app_icon', color: '#07711e'); ConnectycubeFlutterCallKit.showCallNotification(callEvent); super.initState(); }
void getLastCallId() async { print(await ConnectycubeFlutterCallKit.getLastCallId()); }
Future
Future
@override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text('Plugin example app'), ), body: Center( child: Text('Running on: $_platformVersion\n'), ), ), ); } } `
For some weird reason in the logs user_info is showing {user_info: [123, 125]}, even though I have specified it explicitly to be null, and if I try to add something in user_info such as let's say: user_info:{"Name":"XYZ"}, then it will print out a lot of numbers in user_info and it will look like this:
flutter: [CallEvent.fromMap] map: {user_info: [123, 34, 78, 97, 109, 101, 34, 58, 34, 88, 89, 90, 34, 125], call_type: 0, caller_id: 714, call_opponents: 101, session_id: 2485f56e-902c-4732-9e0a-d74c4bf357f2, caller_name: dadaa}
will check it soon
@sudobrackets @Space-Meet the version 2.0.2 was released, try it