Stacked-Org/stacked

[bug]: When auto completing username/password in Chrome "Error: Unexpected null value." seemingly related to keyboard_binding

Closed this issue · 2 comments

Describe the bug

Error: Unexpected null value.
dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3 throw
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 943:18 nullCheck
lib/_engine/engine/keyboard_binding.dart 372:38 [_handleEvent]
lib/_engine/engine/keyboard_binding.dart 582:7 handleEvent
lib/_engine/engine/keyboard_binding.dart 98:7
lib/_engine/engine/keyboard_binding.dart 140:9 loggedHandler
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37 _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39 dcall

To reproduce

Open app In Chrome
In username field arrow down, so to get suggestions
select a username/password combination, which auto fills the username and password fields.
The above error is shown in log

Expected behavior

No response

Screenshots

image

Additional Context

annotation:
@FormView(autoTextFieldValidation: false, fields: [
FormTextField(name: 'email', validator: validateEmail),
FormTextField(name: 'password', validator: validatePassword),
])

Formfields:
T2OTextFormField(
padding: const EdgeInsets.only(top: 40, bottom: 10),
autofillHints: const [AutofillHints.username],
controller: emailController,
onFieldSubmitted: (value) => passwordFocusNode.requestFocus(),
keyboardType: TextInputType.emailAddress,
hintText: 'ui.label.emailaddress'.tr(),
),
FormValidationResult(showValidationMessage: viewModel.hasEmailValidationMessage, message: viewModel.emailValidationMessage?.tr()),
T2OTextFormField(
padding: const EdgeInsets.only(top: 10.0, bottom: 5),
autofillHints: const [AutofillHints.password],
controller: passwordController,
onFieldSubmitted: (password) => viewModel.loginWithCredentials(),
hintText: 'ui.label.password'.tr(),
textInputAction: TextInputAction.go,
obscureText: true,
),
FormValidationResult(showValidationMessage: viewModel.hasPasswordValidationMessage, message: viewModel.passwordValidationMessage?.tr()),

Possibly related to this issue reported to Flutter team:
flutter/flutter#85807

Yes, nothing in the call stack is code we write so it's a Flutter issue.

I will close this issue now. You can reopen if you think there's something we can do in stacked to fix this.