Skip to content

Flutter test driver break TextField #17472

Closed

Description

@polenchheang

Steps to Reproduce

  1. run: flutter create --with-driver-test my_project
  2. Notice that enableFlutterDriverExtension(); inside main.dart main method
  3. Add TextField to your UI
  4. Keyboard won't show when you click TextField
  5. remove enableFlutterDriverExtension(); Keyboard show as expected.

Logs

[  +16 ms] [/home/polen/Flutter/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +29 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] [/home/polen/Flutter/flutter/] git rev-parse --abbrev-ref HEAD
[   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[        ] [/home/polen/Flutter/flutter/] git ls-remote --get-url origin
[   +8 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[        ] [/home/polen/Flutter/flutter/] git log -n 1 --pretty=format:%H
[  +11 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 21c2e47f29ec8aaf14f8b137de941bb5aa89d6de
[        ] [/home/polen/Flutter/flutter/] git log -n 1 --pretty=format:%ar
[   +9 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[        ] 31 hours ago
[        ] [/home/polen/Flutter/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +53 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v0.4.2-16-g21c2e47
[  +60 ms] "flutter run" took 10ms.
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
Do not run this command from the root of your git clone of Flutter.

#0      FlutterCommand.validateCommand (package:flutter_tools/src/runner/flutter_command.dart:427)
<asynchronous suspension>
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:251)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:323)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:279)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#5      _rootRun (dart:async/zone.dart:1126)
#6      _CustomZone.run (dart:async/zone.dart:1023)
#7      runZoned (dart:async/zone.dart:1501)
#8      AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#9      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:270)
#10     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#11     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:309)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#13     _rootRun (dart:async/zone.dart:1126)
#14     _CustomZone.run (dart:async/zone.dart:1023)
#15     runZoned (dart:async/zone.dart:1501)
#16     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#17     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)
<asynchronous suspension>
#18     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#19     new Future.sync (dart:async/future.dart:222)
#20     CommandRunner.run (package:args/command_runner.dart:109)
#21     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#22     run.<anonymous closure> (package:flutter_tools/runner.dart:54)
<asynchronous suspension>
#23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#24     _rootRun (dart:async/zone.dart:1126)
#25     _CustomZone.run (dart:async/zone.dart:1023)
#26     runZoned (dart:async/zone.dart:1501)
#27     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#28     runInContext (package:flutter_tools/src/context_runner.dart:42)
<asynchronous suspension>
#29     run (package:flutter_tools/runner.dart:49)
#30     main (package:flutter_tools/executable.dart:48)
<asynchronous suspension>
#31     main (file:///home/polen/Flutter/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#32     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#33     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

Analyzing /home/polen/workspaces/flutter/test_project...
No issues found!
Ran in 6.2s

No issues found!
Ran in 6.2s
[polen@polen-dmi test_project]$ flutter doctor -v
[✓] Flutter (Channel master, v0.4.3-pre.16, on Linux, locale en_GB.UTF-8)
    • Flutter version 0.4.3-pre.16 at /home/polen/Flutter/flutter
    • Framework revision 21c2e47f29 (31 hours ago), 2018-05-08 23:23:34 -0700
    • Engine revision 11d6da3cd9
    • Dart version 2.0.0-dev.53.0.flutter-e6d7d67f4b

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /home/polen/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /home/polen/Android/Sdk
    • Java binary at: /home/polen/Android/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/polen/Android/android-studio
    • Flutter plugin version 24.2.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.23.0)
    • VS Code at /usr/share/code
    • Dart Code extension version 2.12.1

[✓] Connected devices (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 8.0.0 (API 26) (emulator)

• No issues found!

Activity

  1. zoechi commented on Jul 27, 2018

    @zoechi
    Contributor

    Sorry for the late response.
    Is this still an issue with recent Flutter versions?

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 27, 2018
  3. dbenninger commented on Aug 6, 2018

    @dbenninger

    Yes, I can confirm this is still an issue with flutter v0.5.1

  4. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: flutter driver"flutter driver", flutter_drive, or a driver test
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 15, 2018
  5. polenchheang commented on Aug 29, 2018

    @polenchheang
    Author

    Hi @zoechi, sorry for late reply. Issue is still happen on Flutter 0.7.3-pre.26 • channel master .
    Note: that you need to rebuild the App after you add enableFlutterDriverExtension(); to see the issue.

  6. zoechi commented on Aug 29, 2018

    @zoechi
    Contributor

    @polenchheang thanks a lot for the update.

  7. ROTGP commented on Oct 7, 2018

    @ROTGP
  8. weixfeng commented on Jan 4, 2019

    @weixfeng
  9. ROTGP commented on Feb 6, 2019

    @ROTGP

    @zoechi any progress regarding this issue? It's been open for 9 months and seems to be a blocker. Not being able to perform integration testing essentially prevents us from releasing our app. I'm on Flutter v1.0.0 (stable channel) and the issue as described by @polenchheang continues to exist. After enableFlutterDriverExtension() is called, the keyboard refuses to appear and no text can be entered into the textfield.

  10. zoechi commented on Feb 8, 2019

    @zoechi
    Contributor

    @ROTGP @weixfeng @ shihchanghsiungsonos
    Using "add reaction" on the initial comment would increase priority while +1 comments are rather pointless and cause lots of people to get notified for no reason.
    To get notified yourself use the [Subscribe] button to the top right instead.

  11. added this to the milestone on Feb 8, 2019
  12. jonahwilliams commented on Mar 10, 2019

    @jonahwilliams
    Contributor

    I'm closing this as a duplicate of #15415, which has more information.

  13. github-actions commented on Aug 15, 2021

    @github-actions

    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.

  14. locked as resolved and limited conversation to collaborators on Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consolet: flutter driver"flutter driver", flutter_drive, or a driver testtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions