Repository: flutter
Issue: Cannot flutter attach, failed to complete: _flutter.runInView: (-32000) Could not run configuration in engine
Labels: c: crash,tool,P2,team-tool,triaged-tool

### Steps to Reproduce

1. `flutter create` a new app
2. Open terminal session A and a second session B.
3. In terminal A, `flutter run`.  Wait until the observatory attaches.  Hot restart works fine.
4. In terminal B, `flutter attach`.  It will never attach, and will be stuck at `Updating files`.
5. Back in terminal A, hot restart again.

**Expected results:** <!-- what did you want to see? -->
`Hot restart performed`

**Actual results:** 
Terminal A:
```
[  +37 ms] Performing hot restart... (completed in 418ms)
[        ] Restarted application in 422ms.
[   +6 ms] Application finished.
[   +4 ms] hot restart failed to complete: _flutter.runInView: (-32000) Could not run configuration in engine.
           
[   +2 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1572:11)
           <asynchronous suspension>
           #2      TerminalHandler.processTerminalInput (package:flutter_tools/src/resident_runner.dart:1635:13)
```

Interestingly, after terminal A exits, in the `flutter attach` terminal B unwedges from `Updating files` and attaches:
```
[ +707 ms] Updating files
[+168608 ms] Error writing "build/flutter_assets/FontManifest.json" to DevFS: HttpException: , uri =
http://127.0.0.1:49847/
[        ] trying again in a few - 9 more attempts left
[ +526 ms] DevFS: Sync finished
[   +1 ms] Syncing files to device Jenn iPad Pro... (completed in 169,863ms, longer than expected)
```

[terminalA-run.txt](https://github.com/flutter/flutter/files/5170963/terminalA-run.txt)
[terminalB-attach.txt](https://github.com/flutter/flutter/files/5170964/terminalB-attach.txt)

<details>
  <summary>Logs</summary>
#### Terminal A
```
[   +4 ms] Connected to _flutterView/0x105817c20.
[   +1 ms] Flutter run key commands.
[   +3 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Jenn iPad Pro is available at: http://localhost:49834
[+53588 ms] Starting incremental build...
[   +2 ms] Skipping target: gen_localizations
[   +1 ms] complete
[   +1 ms] Performing hot restart...
[  +10 ms] Scanned through 494 files in 7ms
[        ] Syncing files to device Jenn iPad Pro...
[        ] Scanning asset files
[        ] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:test_create/main.dart 2975278f-e5dc-42c4-ac42-6e0c120ff03d
[        ] <- 2975278f-e5dc-42c4-ac42-6e0c120ff03d
[  +43 ms] Updating files
[ +342 ms] DevFS: Sync finished
[        ] Syncing files to device Jenn iPad Pro... (completed in 387ms)
[        ] Synced 24.4MB.
[        ] <- accept
[ +107 ms] Hot restart performed in 503ms.
[   +4 ms] Performing hot restart... (completed in 511ms)
[        ] Restarted application in 516ms.
[+1433 ms] Starting incremental build...
[   +1 ms] Skipping target: gen_localizations
[        ] complete
[        ] Performing hot restart...
[   +4 ms] Scanned through 494 files in 4ms
[        ] Syncing files to device Jenn iPad Pro...
[        ] Scanning asset files
[        ] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:test_create/main.dart 35888232-1b21-402f-a5da-5fec2e05ee1b
[        ] <- 35888232-1b21-402f-a5da-5fec2e05ee1b
[  +41 ms] Updating files
[ +328 ms] DevFS: Sync finished
[        ] Syncing files to device Jenn iPad Pro... (completed in 370ms)
[        ] Synced 24.4MB.
[        ] <- accept
[ +104 ms] Hot restart performed in 480ms.
[   +1 ms] Performing hot restart... (completed in 482ms)
[        ] Restarted application in 485ms.
[+66765 ms] Starting incremental build...
[   +2 ms] Skipping target: gen_localizations
[   +1 ms] complete
[        ] Performing hot restart...
[   +8 ms] Scanned through 494 files in 8ms
[        ] Syncing files to device Jenn iPad Pro...
[        ] Scanning asset files
[        ] <- reset
[        ] Compiling dart to kernel with 0 updated files
[        ] <- recompile package:test_create/main.dart 1a3364c5-0540-4bfb-ae92-950afc04610d
[        ] <- 1a3364c5-0540-4bfb-ae92-950afc04610d
[  +42 ms] Updating files
[ +327 ms] DevFS: Sync finished
[        ] Syncing files to device Jenn iPad Pro... (completed in 371ms)
[        ] Synced 24.4MB.
[        ] <- accept
[  +37 ms] Performing hot restart... (completed in 418ms)
[        ] Restarted application in 422ms.
[   +6 ms] Application finished.
[   +4 ms] hot restart failed to complete: _flutter.runInView: (-32000) Could not run configuration in engine.
           
[   +2 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1572:11)
           <asynchronous suspension>
           #2      TerminalHandler.processTerminalInput (package:flutter_tools/src/resident_runner.dart:1635:13)
```
#### Terminal B
```
[   +6 ms] <- compile package:test_create/main.dart
[ +707 ms] Updating files
[+168608 ms] Error writing "build/flutter_assets/FontManifest.json" to DevFS: HttpException: , uri =
http://127.0.0.1:49847/
[        ] trying again in a few - 9 more attempts left
[ +526 ms] DevFS: Sync finished
[   +1 ms] Syncing files to device Jenn iPad Pro... (completed in 169,863ms, longer than expected)
[   +1 ms] Synced 1.7MB.
[   +2 ms] <- accept
[   +5 ms] Connected to _flutterView/0x105817c20.
[   +2 ms] Flutter run key commands.
[   +3 ms] r Hot reload. 🔥🔥🔥
[   +2 ms] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Jenn iPad Pro is available at: http://127.0.0.1:49847/
```

```
[✓] Flutter (Channel master, 1.22.0-10.0.pre.73, on macOS 11.0 20A5364e, locale
    en-US)
    • Flutter version 1.22.0-10.0.pre.73 at /Users/surry/Projects/flutter
    • Framework revision 1135002b0f (29 minutes ago), 2020-09-03 12:46:24 -0700
    • Engine revision 165abef0a2
    • Dart version 2.10.0 (build 2.10.0-77.0.dev)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, set
      ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.
 
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode-12-beta6.app/Contents/Developer
    • Xcode 12.0, Build version 12A8189n
    • CocoaPods version 1.9.3

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).

[✓] Connected device (2 available)
    • Jenn iPad Pro (mobile) • 00008027-001925360106802E • ios        • iOS 14.0
    • macOS (desktop)        • macos                     • darwin-x64 • macOS
      11.0 20A5364e

! Doctor found issues in 2 categories.
```

</details>