Chat client creating issue when pass token after fetch from rest-api (PlatformException (PlatformException(3, Command timeout reached, 0, null))
I am facing exception in code block to create chatClient.
await TwilioProgrammableChat.debug(dart: true, native: true, sdk: false); final token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2MTJkYjc0NjQ3Yzg5NjIzODI4ZDQ3M2ZkYWY1MDRkLTE2MzYxMTExOTAiLCJpc3MiOiJTS2I2MTJkYjc0NjQ3Yzg5NjIzODI4ZDQ3M2ZkYWY1MDRkIiwic3ViIjoiQUMwOGFkZDBhOTM4OTVjMjQ3YzE0NDJjN2I2YTQ0NTVjOCIsImV4cCI6MTYzNjExNDc5MCwiZ3JhbnRzIjp7ImlkZW50aXR5IjoidGVzdCIsInZpZGVvIjp7InJvb20iOiJDaGF0Um9vbSJ9fX0.V1f6qtkP8DgkUXJpPXJVmcBMrD5x8ogKZWDOAhpT1pM'; // twilioRoomTokenResponse.token; // if (token == null) { // throw Exception('Response token is null.'); // } print('properties ${properties.region} ${properties.toString()}'); final chatClient = await TwilioProgrammableChat.create(token, properties);
this token is created with passing following parameters
// Create access token, which we will serialize and send to the client $token = new AccessToken( $twilioAccountSid, $twilioApiKey, $twilioApiSecret, 3600, $identity );
logs
W/IInputConnectionWrapper( 4262): getSelectedText on inactive InputConnection W/IInputConnectionWrapper( 4262): requestCursorAnchorInfo on inactive InputConnection 2 W/IInputConnectionWrapper( 4262): getTextBeforeCursor on inactive InputConnection D/InputConnectionAdaptor( 4262): The input method toggled cursor monitoring on I/TextInputPlugin( 4262): Composing region changed by the framework. Restarting the input method. 2 W/IInputConnectionWrapper( 4262): getTextBeforeCursor on inactive InputConnection D/InputConnectionAdaptor( 4262): The input method toggled cursor monitoring on I/TextInputPlugin( 4262): Composing region changed by the framework. Restarting the input method. 2 W/IInputConnectionWrapper( 4262): getTextBeforeCursor on inactive InputConnection D/InputConnectionAdaptor( 4262): The input method toggled cursor monitoring on I/TextInputPlugin( 4262): Composing region changed by the framework. Restarting the input method. D/InputConnectionAdaptor( 4262): The input method toggled cursor monitoring on I/flutter ( 4262): properties us1 Instance of 'Properties' D/Twilio_PChat( 4262): TwilioProgrammableChatPlugin.onAttachedToEngine => Logging eventChannel attached D/Twilio_PChat( 4262): TwilioProgrammableChatPlugin.onMethodCall => received create D/Twilio_PChat( 4262): TwilioProgrammableChatPlugin.create => called D/Twilio_PChat( 4262): TwilioProgrammableChatPlugin.create => setting Properties.region to 'us1' I/flutter ( 4262): [ NATIVE ] TwilioProgrammableChatPlugin.onAttachedToEngine => Logging eventChannel attached I/ChatClient( 4262): Twilio Chat SDK version 5.1.1-42a85b09 I/flutter ( 4262): [ NATIVE ] TwilioProgrammableChatPlugin.onMethodCall => received create I/flutter ( 4262): [ NATIVE ] TwilioProgrammableChatPlugin.create => called I/flutter ( 4262): [ NATIVE ] TwilioProgrammableChatPlugin.create => setting Properties.region to 'us1' D/Twilio_PChat( 4262): TwilioProgrammableChatPlugin.create => ChatClient.create onError: Error 0:3 Command timeout reached I/flutter ( 4262): ErrorInfo: code: 3, message: Command timeout reached, status: 0 I/flutter ( 4262): finally E/flutter ( 4262): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: ErrorInfo: code: 3, message: Command timeout reached, status: 0 E/flutter ( 4262): #0 TwilioProgrammableChat.create package:twilio_programmable_chat/src/programmable_chat.dart:83 E/flutter ( 4262): E/flutter ( 4262): #1 (closed) JoinBloc.submit package:twilio_programmable_chat_example/join/join_bloc.dart:38 E/flutter ( 4262): E/flutter ( 4262): #2 (closed) _JoinFormState._submit package:twilio_programmable_chat_example/join/join_form.dart:114 E/flutter ( 4262): E/flutter ( 4262): I/flutter ( 4262): [ NATIVE ] TwilioProgrammableChatPlugin.create => ChatClient.create onError: Error 0:3 Command timeout reached