Skip to content

'flutter drive' fails to detect iOS hardware #5294

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

Closed
rmacnak-google opened this issue Aug 8, 2016 · 7 comments
Closed

'flutter drive' fails to detect iOS hardware #5294

rmacnak-google opened this issue Aug 8, 2016 · 7 comments
Assignees
Labels
a: tests "flutter test", flutter_test, or one of our tests platform-ios iOS applications specifically

Comments

@rmacnak-google
Copy link
Contributor

In flutter/examples/stocks, with an iPod Touch connected (that flutter run successfully detects)

stocks$ flutter drive --local-engine ~/Flutter/engine/src/out/ios_profile --profile -t test_driver/scroll_perf.dart
Starting iOS Simulator, because did not find existing connected devices.
Waiting for iOS Simulator to boot...
@Hixie Hixie modified the milestone: Flutter 1.0 Sep 12, 2016
@eseidelGoogle
Copy link
Contributor

I believe @yjbanov has this working?

@yjbanov
Copy link
Contributor

yjbanov commented Sep 29, 2016

Is this still an issue? I have not taken any action on this, but it works on an iPhone.

@rmacnak-google
Copy link
Contributor Author

Yes, flutter drive still starts a simulator instead of using my iPod Touch.

@eseidelGoogle
Copy link
Contributor

Amazingly this appears to still be an issue?

eseidel@eseidel-macbookpro /src/flutter/examples/stocks %flutter drive                                                                    [/src/flutter/examples/stocks]
Running 'flutter packages get' in stocks...         631ms
Starting iOS Simulator, because did not find existing connected devices.

Oops; flutter has exited unexpectedly.
Crash report written to /src/flutter/examples/stocks/flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.
eseidel@eseidel-macbookpro /src/flutter/examples/stocks %flutter devices                                                                  [/src/flutter/examples/stocks]
1 connected device:

iPod touch • 9fbe53ba4d06927398644c5bd520d2aa18053017 • ios • iOS 9.3.4 (13G35)

Here is the log from the crash

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter drive

exception

NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling:

dart:core                                                         Object.noSuchMethod
package:flutter_tools/src/ios/simulators.dart 808                 compareIphoneVersions
package:flutter_tools/src/ios/simulators.dart 129                 SimControl._findSuitableDeviceType.<fn>
dart:collection                                                   Object&ListMixin.sort
package:flutter_tools/src/ios/simulators.dart 129                 SimControl._findSuitableDeviceType
package:flutter_tools/src/ios/simulators.dart 102                 SimControl._createTestDevice
package:flutter_tools/src/ios/simulators.dart 65                  SimControl.boot.<async>
===== asynchronous gap ===========================
dart:async                                                        _Completer.completeError
package:flutter_tools/src/ios/simulators.dart 101                 SimControl.boot.<async>
===== asynchronous gap ===========================
dart:async                                                        Future.Future.microtask
package:flutter_tools/src/ios/simulators.dart                     SimControl.boot
package:flutter_tools/src/commands/drive.dart 224                 findTargetDevice.<async>
dart:async                                                        _SyncCompleter.complete
package:flutter_tools/src/device.dart 72                          DeviceManager.getAllConnectedDevices.<async>
===== asynchronous gap ===========================
dart:async                                                        _asyncThenWrapperHelper
package:flutter_tools/src/commands/drive.dart                     findTargetDevice
package:flutter_tools/src/commands/drive.dart 95                  DriveCommand.runCommand.<async>
===== asynchronous gap ===========================
dart:async                                                        Future.Future.microtask
package:flutter_tools/src/commands/drive.dart                     DriveCommand.runCommand
package:flutter_tools/src/runner/flutter_command.dart 148         FlutterCommand.verifyThenRunCommand.<async>
dart:async                                                        _SyncCompleter.complete
package:flutter_tools/src/dart/pub.dart 67                        pubGet.<async>
dart:async                                                        _SyncCompleter.complete
package:flutter_tools/src/base/process.dart 113                   runCommandAndStreamOutput.<async>
===== asynchronous gap ===========================
dart:async                                                        _asyncThenWrapperHelper
package:flutter_tools/src/runner/flutter_command.dart             FlutterCommand.verifyThenRunCommand
package:flutter_tools/src/commands/drive.dart 86                  DriveCommand.verifyThenRunCommand.<async>
===== asynchronous gap ===========================
dart:async                                                        Future.Future.microtask
package:flutter_tools/src/commands/drive.dart                     DriveCommand.verifyThenRunCommand
package:flutter_tools/src/runner/flutter_command.dart 119         FlutterCommand.run
package:args/command_runner.dart 194                              CommandRunner.runCommand.<async>
===== asynchronous gap ===========================
dart:async                                                        Future.Future.microtask
package:args/command_runner.dart                                  CommandRunner.runCommand
package:flutter_tools/src/runner/flutter_command_runner.dart 212  FlutterCommandRunner.runCommand.<async>
dart:async                                                        _SyncCompleter.complete
package:flutter_tools/src/cache.dart 73                           Cache.lock.<async>
===== asynchronous gap ===========================
dart:async                                                        _asyncThenWrapperHelper
package:flutter_tools/src/runner/flutter_command_runner.dart      FlutterCommandRunner.runCommand
package:args/command_runner.dart 109                              CommandRunner.run.<fn>
dart:async                                                        Future.Future.sync
package:args/command_runner.dart 109                              CommandRunner.run
package:flutter_tools/src/runner/flutter_command_runner.dart 150  FlutterCommandRunner.run
package:flutter_tools/executable.dart 124                         main.<async>.<fn>.<fn>.<async>
===== asynchronous gap ===========================
package:stack_trace                                               Chain.capture
package:flutter_tools/executable.dart 123                         main.<async>.<fn>
package:flutter_tools/src/base/context.dart 76                    AppContext._run.<async>

flutter doctor

[✓] Flutter (on Mac OS, channel master)
    • Flutter at /src/flutter
    • Framework revision a69a7542eb (6 months ago), 2016-08-05 09:06:32
    • Engine revision c354127d4d
    • Tools Dart version 1.22.0-dev.10.3

[✓] Android toolchain - develop for Android devices (Android SDK 23.0.2)
    • Android SDK at /Users/eseidel/Library/Android/sdk
    • Platform android-23, build-tools 23.0.2
    • Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.2.1, Build version 8C1002
    • ios-deploy 1.9.1

[✓] IntelliJ IDEA Community Edition (version 2016.3.3)
    • Dart plugin version 163.11306
    • Flutter plugin version 0.1.8.1

[✓] Connected devices
    • iPod touch • 9fbe53ba4d06927398644c5bd520d2aa18053017 • ios • iOS 9.3.4 (13G35)

@eseidelGoogle eseidelGoogle added the a: tests "flutter test", flutter_test, or one of our tests label Feb 3, 2017
@Hixie
Copy link
Contributor

Hixie commented Nov 14, 2017

I bet the problem is that "iPod touch" doesn't match _iosDeviceTypePattern.

This should be relatively easy to fix.

@Hixie Hixie added the easy fix label Nov 14, 2017
@Hixie Hixie modified the milestones: 5: Make Hixie proud, 4: Next milestone Nov 14, 2017
@Hixie Hixie added the platform-ios iOS applications specifically label Nov 14, 2017
@cbracken
Copy link
Member

Tested locally and this is now working. I'm unaware of when the fix was landed.

% flutter drive test_driver/scroll_perf.dart
Using device Flutter iPod.
Starting application: test_driver/scroll_perf.dart
Could not find application bundle at build/ios/iphoneos/Runner.app; have you run "flutter build ios"?
Found saved certificate choice "iPhone Developer: Google Development (XXXXXXXXXX)". To clear, use "flutter config".
Signing iOS app for device deployment using developer identity: "iPhone Developer: Google Development (XXXXXXXXXX)"
Manually selecting Google's mobile provisioning profile (see go/google-flutter-signing).
Starting Xcode build...
 ├─Assembling Flutter resources...                    7.1s
 └─Compiling, linking and signing...                 13.0s
Xcode build done.                                           21.7s
Installing and launching...
flutter: Observatory listening on http://127.0.0.1:49755/
00:00 +0: scrolling performance test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:8110/
[trace] FlutterDriver: Isolate found with number: 459132484
[trace] FlutterDriver: Isolate is paused at start.
[trace] FlutterDriver: Attempting to resume isolate
[trace] FlutterDriver: Waiting for service extension
[info ] FlutterDriver: Connected to Flutter application.
00:03 +0: scrolling performance test measure
00:19 +1: scrolling performance test (tearDownAll)
00:19 +1: All tests passed!
Stopping application instance.

@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 Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: tests "flutter test", flutter_test, or one of our tests platform-ios iOS applications specifically
Projects
None yet
Development

No branches or pull requests

5 participants