No host specified in URI error

This error occurs in the ‘MessageCollection’ when join a channel from the channel list after logging out and back in.

The error disappears when the app is re-launched.

Here’s the error

Invalid argument(s): No host specified in URI https:/v3/group_channels/sendbird_group_channel_122943098_142cf043fae1da97f4ea1e8dc5909ce64663d3d9/messages?with_sorted_meta_array=false&include_reactions=false&include_thread_info=false&include_parent_message_info=false&prev_limit=20&next_limit=0&include=true&reverse=false&show_subchannel_messages_only=false&is_sdk=true&include_poll_details=true&message_ts=9223372036854775807

The error occurs even if you write apiHost on the connection.

 await SendbirdChat.connect(
      userId,
      apiHost: 'api-$appId.sendbird.com',
  );

Hello @zvgandam,

Is there any reason you’re trying to specify a custom apiHost? You should not specify one and it will automatically generate the url internally.

Hello, @Tyler

I just wrote it down because the host was not specified even when it was not specified

@zvgandam Did you init the SDK first?

SendbirdChat.init(appId: 'APP_ID');

Yes! @Tyler

In main.dart

SendbirdChat.init(appId: sendbirdAppId);

I guess next steps are to understand what version of Flutter SDK you’re using?

@Tyler

Using this SDK version.

sendbird_chat_sdk: ^4.0.0

It seems that [GroupChannelCollectionHandler] is not working properly when logout and login.

Can you look at the lock file to see what version is actually installed?
In regards to the handler, can you help me understand why you think that is relevant to this problem? The handler should have no impact over the API calls.

@Tyler

Thanks for responding!
The problem was elsewhere… I’m sorry!
Thank you so much.