Repository navigation
[Android][Samsung]: Tapping on special characters button from virtual keyboard triggers performPrivateCommand : onAppPrivateCommand @ EditableText: "_CastError (Null check operator used on a null value)" error. #97634
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationa: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
I have a Samsung Tab S2 version 7 android tablet.
I can't find anywhere a solution for this error, in the EditableText widget.
What happens is that in a TextFormField widget with its respective TextEditingController, I enter the name of my user, however I need this character " _ ", when I change to special characters on the keyboard to search for it... I get this error...
flutter doctor -v
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [version 10.0.19044.1466], locale fr-FR)
• Flutter version 2.8.1 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\Daniel ROLDAN\AppData\Local\Android\Sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = C:\Users\Daniel ROLDAN\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• 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.10+0-b96-7249189)
[√] VS Code (version 1.63.2)
• VS Code at C:\Users\Daniel ROLDAN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.32.0
[√] Connected device (3 available)
• SM T813 (mobile) • 3b8bea59055e2627 • android-arm64 • Android 7.0 (API 24)
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
• Edge (web) • edge • web-javascript • Microsoft Edge 96.0.1054.62
• No issues found!
This is a small example because in all the fields where I can write I get this error...
TextEditingController accountController = TextEditingController();
Padding(
padding: EdgeInsets.fromLTRB(20, 0, 20, 0),
child: TextFormField(
scrollPadding: EdgeInsets.only(
bottom: Device.screenHeight * 0.25,
),
controller: accountController ,
textInputAction:
widget.isPassword ? TextInputAction.done : TextInputAction.next,
onFieldSubmitted: () {},
enableSuggestions: !widget.isPassword,
autocorrect: !widget.isPassword,
obscureText: widget.isPassword && this.isPasswordHidden!,
validator: () {},
style: TextStyle(
fontSize: 20,
),
decoration: InputDecoration(
suffixIcon: IconButton(
icon: Icon(
Icons.visibility_off,
size: 30,
color: DesignConstants.loginFontColor,
),
onPressed: (){},
splashRadius: 10,
),
hintText: widget.labelText,
helperText: widget.helperText,
),
),
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationDebugging, breakpoints, expression evaluationa: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version



Activity
darshankawar commentedon Feb 2, 2022
@kauzige
Can you provide complete error log ?
And If I understand correctly, you want to enter a username containing an underscore, and in order to do that you tap on the special char button which throws the null check error. Is that correct interpretation ?
Also to confirm this behavior, can you also check the same on latest master and see if it persists ?
danielrrys commentedon Feb 2, 2022
@darshankawar
That's the weird thing here, when that happens it only happens when I use debug, and no errors appear in the console. The only thing that appears is this :
You are right, as the first image shows, when I click on the special characters I get that error.
On the other hand, I have already changed to the latest master version and changed some compile version parameters that it asked me for and it still keeps that error only on my tablet, because on the mobile phone that does not happen and yes, I have already updated my tablet to the latest version.
darshankawar commentedon Feb 3, 2022
@kauzige
Thanks for the details. Can you also try a scenario wherein you input a text in TextFormField, enable debugger and try to delete one char at a time and see if you get the same
_CastErroror not ?Also try the same on an Android device and see what you get.
The error you are getting
[performPrivateCommand : onAppPrivateCommand](https://github.com/flutter/flutter/issues/97634#)indicatesThis is used to receive a private command from the input method.danielrrys commentedon Feb 3, 2022
@darshankawar
I don't seem to have any error when deleting one character at a time with the debugger, I just get that error when I press the special characters button. I have an android phone and I don't have any problem, I can enter the special characters and I don't get that error.
What I understood with your answer is that the special characters button on the keyboard is a private method, isn't it? Do you know if there is a way to read that button in the code? Or what else could I do ?
On the other hand, in the TextInput widget, there is a switch that tells me the following :
And this is where null data arrives, but I really don't understand why this happens on my tablet and not on my mobile phone cause in the phone does not fit in this case.
darshankawar commentedon Feb 3, 2022
Thanks for further details.
From what I know,
performPrivateCommandis used to receive a private command from the input method and is called when the result ofTextInputClient.performPrivateCommandis received, but I am not sure if triggering special characters button is the only factor to it or not.I am unable to verify this behavior since I don't have any Android Tablet to replicate, so I am going to label it for further input / investigation from the team.
19 remaining items
dmitry-fbm commentedon Oct 10, 2022
Can this please be fixed in the nearest hotfix release?
pvsvamsi commentedon Oct 19, 2022
With these kind of new issues popping up in the new 'stable' releases, as a developer, I feel not to update flutter version, till the older version is deprecated. Can we at least have a better stable releases?
omarfaroke commentedon Oct 25, 2022
Any updates here?
sebdoy commentedon Oct 30, 2022
Same issue here, any fixes?
kinex commentedon Nov 4, 2022
I guess this is a duplicate of #111095, fixed in 3.3.7 https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel
sostenesgomes commentedon Nov 8, 2022
@kinex thanks for reporting. I confirm that in 3.3.7 this issue was fixed.
darshankawar commentedon Nov 9, 2022
Thanks for confirmation. Everyone else in this thread including OP @kauzige, please verify on latest stable version (3.3.7) and confirm, accordingly, I'll update the status of this issue. Thanks.
ndahlquist commentedon Nov 9, 2022
We can also confirm that we've seen no further reports of this issue since updating to 3.3.7 👍
dmitry-fbm commentedon Nov 10, 2022
Also can confirm this is fixed in 3.3.7, thanks.
darshankawar commentedon Nov 11, 2022
Thanks for the update. Based on above recent confirmations, I am going ahead and closing this as fixed.
If anybody disagrees, write in comments and I'll reopen it.
github-actions commentedon Nov 25, 2022
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 -vand a minimal reproduction of the issue.