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

fail more gracefully when creating projects if adb is broken #1139

Open
mit-mit opened this issue Jun 28, 2017 · 1 comment
Open

fail more gracefully when creating projects if adb is broken #1139

mit-mit opened this issue Jun 28, 2017 · 1 comment
Labels
Milestone

Comments

@mit-mit
Copy link
Member

mit-mit commented Jun 28, 2017

Somehow my adb is broken, but still we should fail more graceously in this case:

  1. remove adb from \AppData\Local\Android\sdk\platform-tools
  2. try to create a Flutter project using IntelliJ:

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

command

flutter --no-color create untitled

exception

ArgumentError: Invalid argument(s): Cannot find executable for C:\Users\mit\AppData\Local\Android\sdk\platform-tools\adb.

#0      _getExecutable (package:process/src/interface/local_process_manager.dart:115)
#1      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:86)
#2      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:286)
#3      runSync (package:flutter_tools/src/base/process.dart:261)
#4      getAdbDevices (package:flutter_tools/src/android/android_device.dart:549)
#5      AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device.dart:51)
<asynchronous suspension>
#6      PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:138)
<asynchronous suspension>
#7      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:91)
<asynchronous suspension>
#8      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:493)
<asynchronous suspension>
#9      Doctor.diagnose (package:flutter_tools/src/doctor.dart:105)
<asynchronous suspension>
#10     CreateCommand.runCommand (package:flutter_tools/src/commands/create.dart:224)
<asynchronous suspension>
#11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:210)
<asynchronous suspension>
#12     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:156)
<asynchronous suspension>
#13     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:277)
<asynchronous suspension>
#15     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#16     new Future.sync (dart:async/future.dart:206)
#17     CommandRunner.run (package:args/command_runner.dart:109)
#18     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:161)
#19     run.<anonymous closure> (package:flutter_tools/executable.dart:142)
<asynchronous suspension>
#20     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#21     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#22     _rootRun (dart:async/zone.dart:1120)
#23     _CustomZone.run (dart:async/zone.dart:1001)
#24     runZoned (dart:async/zone.dart:1467)
#25     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#26     run (package:flutter_tools/executable.dart:114)
<asynchronous suspension>
#27     main (package:flutter_tools/executable.dart:67)
<asynchronous suspension>
#28     main (file:///C:/Users/mit/dev/github/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#29     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#30     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

flutter doctor

encountered exception: Invalid argument(s): Cannot find executable for C:\Users\mit\AppData\Local\Android\sdk\platform-tools\adb.

#0      _getExecutable (package:process/src/interface/local_process_manager.dart:115)
#1      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:86)
#2      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:286)
#3      runSync (package:flutter_tools/src/base/process.dart:261)
#4      getAdbDevices (package:flutter_tools/src/android/android_device.dart:549)
#5      AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device.dart:51)
<asynchronous suspension>
#6      PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:138)
<asynchronous suspension>
#7      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:91)
<asynchronous suspension>
#8      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:493)
<asynchronous suspension>
#9      Doctor.diagnose (package:flutter_tools/src/doctor.dart:105)
<asynchronous suspension>
#10     _doctorText.<anonymous closure> (package:flutter_tools/executable.dart:289)
#11     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#12     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#13     _rootRun (dart:async/zone.dart:1120)
#14     _CustomZone.run (dart:async/zone.dart:1001)
#15     runZoned (dart:async/zone.dart:1467)
#16     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#17     _doctorText (package:flutter_tools/executable.dart:289)
<asynchronous suspension>
#18     _createLocalCrashReport (package:flutter_tools/executable.dart:264)
<asynchronous suspension>
#19     _handleToolError (package:flutter_tools/executable.dart:219)
<asynchronous suspension>
#20     run.<anonymous closure> (package:flutter_tools/executable.dart:146)
<asynchronous suspension>
#21     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#22     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#23     _rootRun (dart:async/zone.dart:1120)
#24     _CustomZone.run (dart:async/zone.dart:1001)
#25     runZoned (dart:async/zone.dart:1467)
#26     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#27     run (package:flutter_tools/executable.dart:114)
<asynchronous suspension>
#28     main (package:flutter_tools/executable.dart:67)
<asynchronous suspension>
#29     main (file:///C:/Users/mit/dev/github/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#30     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#31     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
@devoncarew devoncarew added the bug label Jun 28, 2017
@devoncarew devoncarew added this to the On Deck milestone Jun 28, 2017
@pq pq modified the milestones: M16, On Deck Jun 29, 2017
@devoncarew devoncarew changed the title Cannot create projects if adb is broken fail more gracefully when creating projects if adb is broken Jul 5, 2017
@devoncarew
Copy link
Member

They'll be work here in IntelliJ and flutter_tools.

@pq pq modified the milestones: M16, M17 Jul 28, 2017
@devoncarew devoncarew modified the milestones: M17, On Deck Aug 28, 2017
@devoncarew devoncarew modified the milestones: On Deck, Backlog Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants