Skip to content

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

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!

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jul 10, 2018
  2. added this to the milestone on Jan 24, 2019
  3. added
    platform-iosiOS applications specifically
    t: xcode"xcodebuild" on iOS and general Xcode project management
    on Jan 24, 2019
  4. jmagman commented on Nov 14, 2019

    @jmagman
    Member

    I know this wasn't exactly the feature request you meant, but now it prompts the user to allow access to contacts instead of crashing.
    Not seeing anything on a crash is even worse on iOS 13 now because it relies on logging from the VM services, which isn't present once the app crashes.

  5. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  6. removed this from the milestone on Aug 17, 2020
  7. github-actions commented on Aug 12, 2021

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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