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

flutter drive fails on iOS if a device has not been specified #9588

Closed
mravn-google opened this issue Apr 25, 2017 · 3 comments
Closed

flutter drive fails on iOS if a device has not been specified #9588

mravn-google opened this issue Apr 25, 2017 · 3 comments
Labels
tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@mravn-google
Copy link
Contributor

Steps to Reproduce

In a flutter_drive-enabled flutter project, run

$ flutter drive --local-engine ios_debug_unopt
Starting iOS Simulator, because did not find existing connected devices.

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: d14c7b7530000000)
Crash report written to /Users/mravn/github/flutter/dev/integration_tests/channels/flutter_02.log;
please let us know at https://github.com/flutter/flutter/issues.

But this works:

$ flutter drive --local-engine ios_debug_unopt -d c1bdd
Starting application: lib/main.dart
Uploading Runner.app package contents... DONE.
Installing '(null)'
 - CreatingStagingDirectory (5%)
 - ExtractingPackage (15%)
 - InspectingPackage (20%)
 - TakingInstallLock (20%)
 - PreflightingApplication (30%)
 - InstallingEmbeddedProfile (30%)
 - VerifyingApplication (40%)
 - CreatingContainer (50%)
 - InstallingApplication (60%)
 - PostflightingApplication (70%)
 - SandboxingApplication (80%)
 - GeneratingApplicationMap (90%)
Running pod install...                                1.3s
Running Xcode build...                                9.3s
libMobileGestalt MobileGestaltSupport.m:153: pid 403 (Runner) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
Diagnostic server listening on http://127.0.0.1:56013/
Diagnostic server listening on http://127.0.0.1:56013/
Observatory listening on http://127.0.0.1:56014/
Observatory listening on http://127.0.0.1:56014/
00:00 +0: channel suite (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:8102/
[trace] FlutterDriver: Looking for the isolate
[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:02 +0: channel suite step through
00:08 +1: channel suite (tearDownAll)
00:08 +1: All tests passed!
Stopping application instance.
$

Logs

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

command

flutter drive --local-engine ios_debug_unopt

exception

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

#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:43)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:47)
#2      compareIphoneVersions (package:flutter_tools/src/ios/simulators.dart:787)
#3      SimControl._findSuitableDeviceType.<anonymous closure> (package:flutter_tools/src/ios/simulators.dart:127)
#4      Sort._insertionSort (dart:_internal/sort.dart:69)
#5      Sort._doSort (dart:_internal/sort.dart:58)
#6      Sort.sort (dart:_internal/sort.dart:33)
#7      Object&ListMixin.sort (dart:collection/list.dart:309)
#8      SimControl._findSuitableDeviceType (package:flutter_tools/src/ios/simulators.dart:127)
#9      SimControl._createTestDevice (package:flutter_tools/src/ios/simulators.dart:100)
#10     SimControl.boot (package:flutter_tools/src/ios/simulators.dart:63)
<asynchronous suspension>
#11     findTargetDevice (package:flutter_tools/src/commands/drive.dart:221)
<asynchronous suspension>
#12     DriveCommand.runCommand (package:flutter_tools/src/commands/drive.dart:92)
<asynchronous suspension>
#13     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:151)
<asynchronous suspension>
#14     DriveCommand.verifyThenRunCommand (package:flutter_tools/src/commands/drive.dart:83)
<asynchronous suspension>
#15     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:121)
#16     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#17     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:262)
<asynchronous suspension>
#18     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#19     Future.Future.sync (dart:async/future.dart:208)
#20     CommandRunner.run (package:args/command_runner.dart:109)
#21     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:157)
#22     run.<anonymous closure> (package:flutter_tools/executable.dart:140)
<asynchronous suspension>
#23     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#24     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#25     _rootRun (dart:async/zone.dart:1120)
#26     _CustomZone.run (dart:async/zone.dart:1001)
#27     runZoned (dart:async/zone.dart:1465)
#28     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#29     run (package:flutter_tools/executable.dart:113)
<asynchronous suspension>
#30     main (package:flutter_tools/executable.dart:66)
<asynchronous suspension>
#31     main (file:///Users/mravn/github/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#32     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#33     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.4 16E195, channel master)
    • Flutter at /Users/mravn/github/flutter
    • Framework revision 3c7e176a99 (7 hours ago), 2017-04-25 16:08:55 +0200
    • Engine revision a5b64899c9
    • Tools Dart version 1.23.0-dev.11.11

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at /Users/mravn/Library/Android/sdk
    • Platform android-25, build-tools 25.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

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

[✓] Android Studio (version 2.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Gradle version 3.2
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2016.3.4)
    • Dart plugin version 163.13137
    • Flutter plugin version 12.0

[✓] WebStorm (version 2017.1.1)
    • Flutter plugin version 13.0

[✓] Connected devices
    • Mikkel's iPod touch • c1bddaa8c422f9125dcc14b53af91e62aa7036d1 • ios • iOS 10.3.1 (14E304)
@mit-mit mit-mit added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 8, 2017
@mit-mit mit-mit added this to the 3: Current Milestone milestone Jun 8, 2017
@Hixie
Copy link
Contributor

Hixie commented Dec 12, 2017

This seems like a crash that would affect everyone, so leaving in current milestone.
cc @yjbanov

@yjbanov
Copy link
Contributor

yjbanov commented Dec 13, 2017

flutter drive no longer attempts to automatically start the Simulator, so this should not happen any more. I just tried reproducing and got the expected behavior:

No devices connected:

$ flutter drive lib/driver.dart
No devices found.

iPhone connected:

$ flutter drive lib/driver.dart
Using device iPhone.

iPhone 6s Simulator launched:

$ flutter drive lib/driver.dart
Using device iPhone 6s.

iPhone and Moto g4 connected:

$ flutter drive lib/driver.dart
Found multiple connected devices:
  - Moto G 4
  - Pixel 2 XL
  - iPhone

Using device Moto G 4.

Closing

@yjbanov yjbanov closed this as completed Dec 13, 2017
a-siva added a commit that referenced this issue Jul 2, 2019
* Manual roll of engine 45b66b7...ffba2f6

git log 45b66b7...ffba2f6 --oneline

ffba2f6 Roll src/third_party/dart b37aa3b036...0abff7b2bb (#9588)
62514cb Roll fuchsia/sdk/core/mac-amd64 from n9fZpXVmsbgKZzS8Q2GXxB453q8AbLpfGztsPsq47pMC to BYCwsJf7r7zfd2THSGinFeIHv552AEVchXdc7VZzP0IC (#9587)
9f27212 Roll src/third_party/skia e4c88bb1f848..1ddee025229a (7 commits) (#9586)
03a31e0 Roll fuchsia/sdk/core/linux-amd64 from F9oY0d56X3aONxwv5vw9Gco--AHmC8SHuDXdhdWCnnMC to d2VK3FYSEKQ35UdZw5FdbOZUI_xgT0-1h8DnGDUHPVAC (#9583)

* Fix analyzer warning.
johnsonmh pushed a commit to johnsonmh/flutter that referenced this issue Jul 30, 2019
* Manual roll of engine 45b66b7...ffba2f6

git log 45b66b7...ffba2f6 --oneline

ffba2f6 Roll src/third_party/dart b37aa3b036...0abff7b2bb (flutter#9588)
62514cb Roll fuchsia/sdk/core/mac-amd64 from n9fZpXVmsbgKZzS8Q2GXxB453q8AbLpfGztsPsq47pMC to BYCwsJf7r7zfd2THSGinFeIHv552AEVchXdc7VZzP0IC (flutter#9587)
9f27212 Roll src/third_party/skia e4c88bb1f848..1ddee025229a (7 commits) (flutter#9586)
03a31e0 Roll fuchsia/sdk/core/linux-amd64 from F9oY0d56X3aONxwv5vw9Gco--AHmC8SHuDXdhdWCnnMC to d2VK3FYSEKQ35UdZw5FdbOZUI_xgT0-1h8DnGDUHPVAC (flutter#9583)

* Fix analyzer warning.
@github-actions
Copy link

github-actions bot commented Sep 4, 2021

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 Sep 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants