File uploading failed because uploadSizeLimit is set to zero

final params = FileMessageCreateParams.withFile(
      fileName: fileName,
        handler: (message, e) async {
          if (e != null) {
            if ( e is FileSizeLimitExceededException ) {
              showSnackbar(context, '파일 사이즈가 너무 커서 실패하였습니다.');
            print('Error sending file message: ${e.message}');
          } else {
            print('File message sent successfully');
        progressHandler: (sentBytes, totalBytes) {
          setState(() {
            uploadProgress = (sentBytes / totalBytes);

As above, we upload images by calling sendFileMessage function provided by sendbird_chat sdk.

But sometimes, FileSizeLimitExceededException() occurs.

So when I checked the sendbird source code, I found out that chat.chatContext.uploadSizeLimit variable in file [channel_file_upload_request.dart] is set to zero. That’s why image couldn’t be uploaded.

The problem is that uploadSizeLimit value was set after sending API was called.
(line 217 of db_manager.dart)

Please let me know how to fix this issue.

[SDK Version]



more than 50% of the time. But if we send image after waiting for 1 second, error frequency reduces.

[Current impact]