Skip to content

Flutter Run fails without error on iOS if Info.plist is missing needed capability #19196

@timsneath

Description

@timsneath

Steps to Reproduce

  1. Clone this repo
  2. From the flutter_contacts/cupertino_app directory, run flutter run
  3. Command fails with the following message:
Launching lib/main.dart on Tim's iPhone X in debug mode...
Found saved certificate choice "iPhone Developer: Tim Sneath (968GPAAC8N)". To clear, use "flutter config".
Signing iOS app for device deployment using developer identity: "iPhone Developer: Tim Sneath (968GPAAC8N)"
Starting Xcode build...
 ├─Assembling Flutter resources...                    2.5s
 └─Compiling, linking and signing...                  6.7s
Xcode build done.                                           10.7s
Installing and launching...                                 11.9s
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:1025/ws
  1. Add the following to iOS/Runner/Info.plist:
    <key>NSContactsUsageDescription</key>
    <string>This app requires Contacts access to function properly.</string>
  1. Run flutter run again. Command now completes and application executes

Expected Result

Flutter should pass through an error message from Xcode rather than simply bailing. The lack of an error message means that it's hard to know where to start looking.

Logs

[✓] Flutter (Channel master, v0.5.7-pre.82, on Mac OS X 10.13.5 17F77, locale en-US)
    • Flutter version 0.5.7-pre.82 at /Users/timsneath/flutter
    • Framework revision 236acb5219 (3 hours ago), 2018-07-09 18:55:23 -0700
    • Engine revision 6fe748490d
    • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/timsneath/Library/Android/sdk
    • Android NDK at /Users/timsneath/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.25.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.15.0

[✓] Connected devices (1 available)
    • Tim's iPhone X • 1761195f19f63ed83be7780d8ec49e9d8cbba59f • ios • iOS 11.4.1

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects 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