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

After Flutter update, no longer works on IOS #231

Open
Khaled-Eldeeb-BW opened this issue May 26, 2024 · 15 comments
Open

After Flutter update, no longer works on IOS #231

Khaled-Eldeeb-BW opened this issue May 26, 2024 · 15 comments

Comments

@Khaled-Eldeeb-BW
Copy link

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-EG) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2022.3) [✓] VS Code (version 1.89.1) [✓] Connected device (4 available) [✓] Network resources

### Error from Terminal
`════════ Exception caught by foundation library ════════════════════════════════
The following StateError was thrown while dispatching notifications for FocusNode:
Bad state: No element

When the exception was thrown, this was the stack:
#0 List.single (dart:core-patch/growable_array.dart:353:22)
growable_array.dart:353
#1 TextPainter.getFullHeightForCaret (package:flutter/src/painting/text_painter.dart:1356:122)
text_painter.dart:1356
#2 RenderEditable.getLocalRectForCaret (package:flutter/src/rendering/editable.dart:1801:48)
editable.dart:1801
#3 EditableTextState._updateComposingRectIfNeeded (package:flutter/src/widgets/editable_text.dart:4491:38)
editable_text.dart:4491
#4 EditableTextState._schedulePeriodicPostFrameCallbacks (package:flutter/src/widgets/editable_text.dart:4397:5)
editable_text.dart:4397
#5 EditableTextState._openInputConnection (package:flutter/src/widgets/editable_text.dart:3599:7)
editable_text.dart:3599
#6 EditableTextState._openOrCloseInputConnectionIfNeeded (package:flutter/src/widgets/editable_text.dart:3633:7)
editable_text.dart:3633
#7 EditableTextState._handleFocusChanged (package:flutter/src/widgets/editable_text.dart:4333:5)
editable_text.dart:4333
#8 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:433:24)
change_notifier.dart:433
#9 FocusNode._notify (package:flutter/src/widgets/focus_manager.dart:1090:5)
focus_manager.dart:1090
#10 FocusManager.applyFocusChangesIfNeeded (package:flutter/src/widgets/focus_manager.dart:1850:12)
focus_manager.dart:1850
(elided 2 frames from dart:async)

The FocusNode sending notification was: FocusNode#84319([PRIMARY FOCUS])
context: Focus
PRIMARY FOCUS`

@jaumard
Copy link
Owner

jaumard commented Jun 7, 2024

does it work if you try the master branch? Also on your stack I don't see any crash from this package so a bit hard to know what's going on.

@FridaySteven
Copy link

PinFieldAutoFill: autofocus and focusNode not working after Flutter update.

Flutter 3.22.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5dcb86f68f (5 weeks ago) • 2024-05-09 07:39:20 -0500
Engine • revision f6344b75dc
Tools • Dart 3.4.0 • DevTools 2.34.3

sms_autofill: ^2.3.0

@Aakash1111
Copy link

Aakash1111 commented Jun 17, 2024

Also facing the same issue when uopgraded the Flutter version equal to or above 3.22.0.

Working fine on below versions -
Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (3 months ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1

Those who can downgrade the flutter version to solve this problem till @jaumard and team fix this, use command below -
flutter downgrade 3.19

@yogeshelevn
Copy link

yogeshelevn commented Jun 19, 2024

@jaumard We are also facing the same issue. it is working fine till flutter version 3.19.5. this is very major issue we are facing. please fix this.

@jaumard
Copy link
Owner

jaumard commented Jun 19, 2024

This packages does nothing on iOS... Maybe something change on flutter side that now needs something to be done. PR are welcome if you want to help.

@yogeshelevn
Copy link

@Aakash1111 , the Flutter downgrade command is not working and is giving the following error: "There is no previously recorded version for channel 'master'." is there anything that i can try ??

@gfb-47
Copy link

gfb-47 commented Jun 24, 2024

same here

@Aakash1111
Copy link

There is no previously recorded version for channel 'master'

https://stackoverflow.com/questions/66545480/flutter-downgrade-error-there-is-no-previously-recorded-version-for-channel - Please try this guide.

@tungdevpro
Copy link

I also got the same error on version 3.22.2

@Jigneshiosdeveloper
Copy link

Did you try with the latest version of sms_autofill 2.4.0? You can see in details how to read OTP from SMS Autofill in Flutter.

@joknjokn
Copy link

@Jigneshiosdeveloper We encounter the same issue, and we're on 2.4.0 with Flutter 3.22.2, and we've followed the guide.

The issue only happens when autoFocus: true.

@Jigneshiosdeveloper
Copy link

@joknjokn Did you get SMS in your Android phone with appSignature?

<#> You otp code is 121212 appSignature.

Once you get your SMS with this syntax, then only it will work well.

@joknjokn
Copy link

joknjokn commented Jul 18, 2024

@Jigneshiosdeveloper I'm not sure I understand. We only get the "Bad State" error on iOS, and it's not related to the SMS itself in any way - it's autoFocus causing issues.

@Spriggan1992
Copy link

I have the same issue but not only on IOS side but on Android as well.
package version: 2.4.0
Flutter: 3.24.0

@joknjokn
Copy link

We are also now getting it on both iOS and Android. It seems like the bug hit Android with Flutter 3.24.0 upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants