Skip to content

Null check operator used on a null value in StreamMessageInputState._sendOrUpdateMessage #2302

@thecodepapaya

Description

@thecodepapaya

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Android

What version are you using?

stream_chat_flutter: ^9.6.0

What happened?

Crashlytics has recorded null check errors in stream_chat_flutter package.

Steps to reproduce

NA

Supporting info to reproduce

No response

Relevant log output

# Crashlytics - Stack trace
# Application: REDACTED
# Platform: android
# Version: REDACTED
# Issue: 3f26f26a18755bc7dd1ab183e2ae94c1
# Session: 686A41F603750001443A86835CA5171A_DNE_7_v2
# Date: Sun Jul 06 2025 13:30:17 GMT+0400 (Gulf Standard Time)

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value
       at State.context(framework.dart:961)
       at StreamMessageInputState._sendOrUpdateMessage(stream_message_input.dart:1524)
       at StreamMessageInputState.sendMessage(stream_message_input.dart:1510)

Flutter analyze output

No errors.

Flutter doctor output

[✓] Flutter (Channel stable, 3.29.3, on macOS 15.0 24A335 darwin-arm64 (Rosetta), locale en-IN) [1,482ms]
    • Flutter version 3.29.3 on channel stable at /Users/ashutosh.s/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (3 months ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [5.2s]
    • Android SDK at /Users/ashutosh.s/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/ashutosh.s/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0) [2.9s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [14ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [13ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)

[✓] VS Code (version 1.101.2) [11ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.114.0

[✓] Connected device (3 available) [8.2s]
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 15.0 24A335 darwin-arm64 (Rosetta)
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 15.0 24A335 darwin-arm64 (Rosetta)
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 137.0.7151.122

[✓] Network resources [1,282ms]
    • All expected network resources are available.

• No issues found!

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpr_openA PR to fix the issue is already open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions