Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performPrivateCommand provokes Null exception #111095

Closed
TheCarpetMerchant opened this issue Sep 7, 2022 · 4 comments
Closed

performPrivateCommand provokes Null exception #111095

TheCarpetMerchant opened this issue Sep 7, 2022 · 4 comments

Comments

@TheCarpetMerchant
Copy link

Steps to Reproduce

I do not know which widget provokes this exception.
Not having the error-causing widget is still a recurrent problem with all kinds of debugging in Flutter.

Logs

Exception

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Instance of 'ErrorDescription'.
       at EditableTextState.performPrivateCommand(editable_text.dart:2155)
       at TextInput._handleTextInputInvocation(text_input.dart:1821)
       at TextInput._loudlyHandleTextInputInvocation(text_input.dart:1701)
       at MethodChannel._handleAsMethodCall(platform_channel.dart:536)
       at MethodChannel.setMethodCallHandler.<fn>(platform_channel.dart:529)
       at _DefaultBinaryMessenger.setMessageHandler.<fn>(binding.dart:387)

Flutter doctor

[√] Flutter (Channel stable, 3.3.0, on Microsoft Windows [version 10.0.19044.1889], locale fr-BE)
    • Flutter version 3.3.0 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffccd96b62 (9 days ago), 2022-08-29 17:28:57 -0700
    • Engine revision 5e9e0e0aa8
    • Dart version 2.18.0
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\user\AppData\Local\Android\sdk
    • Platform android-33, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.1.32421.90
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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 11.0.12+7-b1504.28-7817840)

[√] VS Code, 64-bit edition (version 1.68.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.44.0

[√] Connected device (2 available)
    • SM A750FN (mobile) • 32005e294fcf368d • android-arm64 • Android 10 (API 29)
    • Windows (desktop)  • windows          • windows-x64   • Microsoft Windows [version 10.0.19044.1889]

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@LongCatIsLooong
Copy link
Contributor

I believe this has already been fixed in https://github.com/flutter/flutter/pull/107683/files#diff-f5f93c879cef9a102adbf148583de9f3d9a05f9678fdcad7bde106f62200bb34

@deepak786
Copy link

@LongCatIsLooong I also have the same issue from the stable version 3.3.
The fix is not available in the Latest stable version.

@miquelbeltran
Copy link
Member

Same issue reported by a user to our crash reporting system, version 3.3.1.

Stacktrace:

Message: Null check operator used on a null value
EditableTextState.performPrivateCommand in package:flutter/src/widgets/editable_text.dart:2155
TextInput._handleTextInputInvocation in package:flutter/src/services/text_input.dart:1821
TextInput._loudlyHandleTextInputInvocation in package:flutter/src/services/text_input.dart:1701
MethodChannel._handleAsMethodCall in package:flutter/src/services/platform_channel.dart:536
MethodChannel.setMethodCallHandler.<fn> in package:flutter/src/services/platform_channel.dart:529
_DefaultBinaryMessenger.setMessageHandler.<fn> in package:flutter/src/services/binding.dart:387
_invoke2 in dart:ui/hooks.dart:186
_ChannelCallbackRecord.invoke in dart:ui/channel_buffers.dart:42
_Channel.push in dart:ui/channel_buffers.dart:132
ChannelBuffers.push in dart:ui/channel_buffers.dart:329
PlatformDispatcher._dispatchPlatformMessage in dart:ui/platform_dispatcher.dart:599
_dispatchPlatformMessage in dart:ui/hooks.dart:89

I believe the problem is this line here:

widget.onAppPrivateCommand!(action, data);

The patch https://github.com/flutter/flutter/pull/107683/files#diff-f5f93c879cef9a102adbf148583de9f3d9a05f9678fdcad7bde106f62200bb34 should fix it, however is still not available on stable.

Also going to older versions of Flutter won't fix the issue either, i.e. the exclamation call is still there in 3.0.5: https://github.com/flutter/flutter/blob/3.0.5/packages/flutter/lib/src/widgets/editable_text.dart#L2016 and there seems to be other older similar reports: #76601

So the only thing we can do is to wait for the patch to be published.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants