Skip to content

"flutter run" fails to attach to app with iOS 17 physical device #134667

@katjai1

Description

@katjai1

Something wrong with XCode automation. When program is executing on a real device, XCode IDE is opening without any attempts to do the own things in the background.

ki@mini mpc % flutter run
Launching lib/main.dart on KI-PHONE in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 3CEMLXXXXX
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         8.3s
Xcode build done.                                           21.1s
You may be prompted to give access to control Xcode. Flutter uses Xcode to run your app. If access is not allowed, you can change this through your Settings > Privacy & Security > Automation.
Installing and launching...                                      2,004ms
SocketException: Failed to create datagram socket (OS Error: Address already in use, errno = 48), address = , port = 5353
ki@mini mpc % 

After that Xcode starting to wait manual program execution:

image

When I'm trying to do the same with simulator, everything is fine:

ki@mini mpc % flutter run
Connected devices:
KI-PHONE (mobile)          • 00008030-001A6C110CC0402E            • ios            • iOS 17.0 21A329
iPhone 15 Pro Max (mobile) • 55FAD026-4D67-46A5-958C-3C39A5D76468 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
Chrome (web)               • chrome                               • web-javascript • Google Chrome 116.0.5845.187

No wireless devices were found.

[1]: KI-PHONE (00008030-001A6C110CC0402E)
[2]: iPhone 15 Pro Max (55FAD026-4D67-46A5-958C-3C39A5D76468)
[3]: Chrome (chrome)
Please choose one (or "q" to quit): 2
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         8.2s
Xcode build done.                                           47.6s
[VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend.
flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   Log.debug (package:mpc/core/services/log.dart:45:11)
flutter: │ #1   main.<anonymous closure> (package:mpc/main.dart:39:15)
flutter: │ #2   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
[some skipped log]
───────────────────────────────────────────────────────────
Syncing files to device iPhone 15 Pro Max...                       603ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on iPhone 15 Pro Max is available at: http://127.0.0.1:52584/8gbTfhiUSnk=/
The Flutter DevTools debugger and profiler on iPhone 15 Pro Max is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:52584/8gbTfhiUSnk=/

Flutter doctor output:

ki@mini mpc % flutter doctor -v
[✓] Flutter (Channel stable, 3.13.3, on macOS 14.0 23A339 darwin-arm64, locale en-US)
    • Flutter version 3.13.3 on channel stable at /opt/homebrew/Caskroom/flutter/3.13.3/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2524052335 (7 days ago), 2023-09-06 14:32:31 -0700
    • Engine revision b8d35810e9
    • Dart version 3.1.1
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/ki/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 75.1.4
    • Dart plugin version 232.9559.10

[✓] Connected device (2 available)
    • KI-PHONE (mobile) • 00008030-001A6C110CC0402E • ios            • iOS 17.0 21A329
    • Chrome (web)      • chrome                    • web-javascript • Google Chrome 116.0.5845.187

[✓] Network resources
    • All expected network resources are available.

• No issues found!
ki@mini mpc % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-iosiOS applications specificallyr: duplicateIssue is closed as a duplicate of an existing issueteam-iosOwned by iOS platform teamtoolAffects 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