You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Xcode 15 launch failure with iOS 17 physical device in debug mode "Could not call ptrace(PT_TRACE_ME): Operation not permitted. Cannot create a FlutterEngine instance in debug mode without Flutter tooling or Xcode." #136197
and im running debug from vs code command-line and xcode
and sometime i got this notification
Logs
Logs
<!-- Paste your logs here -->
Flutter Doctor output
Doctor output
nikitamihajlov@Mac-mini-Nikita ios % flutter doctorDoctor summary (to see all details, run flutter doctor -v):[✓] Flutter (Channel master, 3.16.0-6.0.pre.45, on macOS 14.0 23A344 darwin-arm64)[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.[✓] Xcode - develop for iOS and macOS (Xcode 15.0)[✓] Chrome - develop for the web[✓] Android Studio (version 2022.3)[✓] VS Code (version 1.83.0)[✓] Connected device (4 available)[✓] Network resources! Doctor found issues in 1 category.
changed the title [-]Xcode 15 launch failure with iOS 17 physical device in debug mode "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." 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.[/-][+]Xcode 15 launch failure with iOS 17 physical device in debug mode "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." You may be prompted to give access to control Xcode[/+]on Oct 9, 2023
I have the same issue. When I try to run with VS Code 's "Start Debugging" option, Debug Console outputs
[VERBOSE-2:ptrace_check.cc(75)] Could not call ptrace(PT_TRACE_ME): Operation not permitted
Cannot create a FlutterEngine instance in debug mode without Flutter tooling or Xcode.
Only way I could launch the app on my Physical Device is by running "flutter run --profile" but that doesn't seem to completely work as well. It's getting stuck at "Installing and launching..." section, but the app is running on my device. Force-closing the operation and running with VS Code's "Start debugging", the app is built on my Physical Device, but still stuck with the warning
The Dart VM Service was not discovered after 60 seconds. This is taking much longer than expected...
Open the Xcode window the project is opened in to ensure the app is running. If the app is not running, try selecting "Product > Run" to fix the problem.
Reacted by Ivan981508, Minas, Joe Armani and hiroshi sakamoto
I believe this is causing it to try enabling manual tracing, which would cause the "Could not call ptrace" and "Cannot create a FlutterEngine instance in debug mode without Flutter tooling or Xcode" error.
@NM4ik When you get the "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." Xcode error, could you click the "Show Details" button and include the logs from it?
I find clearing data in xcode (cmd + k) and then exiting xcode, then re-running from vscode usually works. But it's quite annoying having to do this several times a day now.
I find clearing data in xcode (cmd + k) and then exiting xcode, then re-running from vscode usually works. But it's quite annoying having to do this several times a day now.
@NM4ik Can you open your project in Xcode (e.g. your_project/ios/your_project.xcworkspace) and do "Product > Run". This should trigger Xcode to build and launch your application, then in the Report Navigator, right-click on the Build step and click "Show in Finder".
This should open Finder to a xcresult file. Then can you right-click on the xcresult file and compress it and upload the zip file to this issue?
@NM4ik Okay now it's making sense. So looks like your project is not launching a debugger, which would cause this issue. In Xcode, try going to "Product > Scheme > Edit Scheme" and under Run and Info make sure "Executable" is set to the default Runner.app and "Debug executable" is checked.
Here's an example of what the correct settings should look like:
If your settings don't match the example, can you also include a screenshot of what they were? I'm curious about what your settings might be because by default they should match the example.
Then try running again and see if it works. In Report Navigator, for the Launch step, there should be a "Debug Runner" section if the debugger was launched.
I'm going to keep this issue open. I think actionable work for Flutter can be: we can try parsing the scheme settings and checking to ensure these settings are set as expected and if they're not, we can provide messaging to guide users to fix.
@vashworth after couple times of successful launches with the Debug executable checked,
I'm experiencing same issue again on stable branch.
I've also attached xcresult.
Not sure whats reason for this. Run-Runner-2023.10.18_19-55-54-+0400.xcresult.zip
Seems like the issue still persists and workarounds are not reliable.
Applying @vashworth 's suggestion and running directly from XCode #136197 (comment)
yields "Build Failed" with two issues.
- Framework 'Pods_Runner' not found
- Linker command failed with exit code 1
Trying to launch from VS Code however yields a very different result.
The item at Runner.app is not a valid bundle.
Domain: com.apple.dt.CoreDeviceError
Code: 3000
Failure Reason: The path to the provided bundle's main executable could not be determined.
However, after launching from VS Code and receiving the error above, navigating to XCode and taking a look inside the Runner's Frameworks folder, I see 'Pods_Runner' written in red.
Simply deleting it and running from XCode again(keep in mind that @vashworth 's suggestion is still applied) somehow successfully launched the app.
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.
Activity
Ivan981508 commentedon Oct 9, 2023
[-]Xcode 15 launch failure with iOS 17 physical device in debug mode "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." 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.[/-][+]Xcode 15 launch failure with iOS 17 physical device in debug mode "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." You may be prompted to give access to control Xcode[/+]Sgooll commentedon Oct 9, 2023
berkaykurkcu commentedon Oct 9, 2023
I have the same issue. When I try to run with VS Code 's "Start Debugging" option, Debug Console outputs
Only way I could launch the app on my Physical Device is by running "flutter run --profile" but that doesn't seem to completely work as well. It's getting stuck at "Installing and launching..." section, but the app is running on my device. Force-closing the operation and running with VS Code's "Start debugging", the app is built on my Physical Device, but still stuck with the warning
likwifi commentedon Oct 9, 2023
vashworth commentedon Oct 9, 2023
Seems like the check we use to determine if the app was launched from Xcode appears to be failing occasionally.
https://github.com/flutter/engine/blob/22ce5c6a45e2898b4ce348c514b5fa42ca25bc88/runtime/ptrace_check.cc#L56-L71
I believe this is causing it to try enabling manual tracing, which would cause the "Could not call ptrace" and "Cannot create a FlutterEngine instance in debug mode without Flutter tooling or Xcode" error.
vashworth commentedon Oct 9, 2023
@NM4ik When you get the "Could not obtain access to one or more requested file system resources because CoreDevice was unable to create bookmark data." Xcode error, could you click the "Show Details" button and include the logs from it?
acoutts commentedon Oct 9, 2023
I find clearing data in xcode (cmd + k) and then exiting xcode, then re-running from vscode usually works. But it's quite annoying having to do this several times a day now.
NM4ik commentedon Oct 9, 2023
NM4ik commentedon Oct 9, 2023
not working for me :d
acoutts commentedon Oct 9, 2023
Sorry it's cmd + shift + k to clean the build folder (derived data).
vashworth commentedon Oct 9, 2023
NM4ik commentedon Oct 9, 2023
vashworth commentedon Oct 9, 2023
24 remaining items
vashworth commentedon Oct 16, 2023
@NM4ik Can you open your project in Xcode (e.g.
your_project/ios/your_project.xcworkspace) and do "Product > Run". This should trigger Xcode to build and launch your application, then in the Report Navigator, right-click on the Build step and click "Show in Finder".This should open Finder to a

xcresultfile. Then can you right-click on thexcresultfile and compress it and upload the zip file to this issue?NM4ik commentedon Oct 17, 2023
@vashworth
[file]
vashworth commentedon Oct 17, 2023
@NM4ik Okay now it's making sense. So looks like your project is not launching a debugger, which would cause this issue. In Xcode, try going to "Product > Scheme > Edit Scheme" and under Run and Info make sure "Executable" is set to the default Runner.app and "Debug executable" is checked.
Here's an example of what the correct settings should look like:
If your settings don't match the example, can you also include a screenshot of what they were? I'm curious about what your settings might be because by default they should match the example.
Then try running again and see if it works. In Report Navigator, for the Launch step, there should be a "Debug Runner" section if the debugger was launched.
NM4ik commentedon Oct 17, 2023
@vashworth
There were such settings after updating xCode
It works! Thank you :D
I did:
enable Debug executable checkbox
flutter channel stable (because master didnt work)
flutter clean
flutter pub get
pod install --repo-update
flutter run
vashworth commentedon Oct 17, 2023
@NM4ik Excellent! Thank you for your assistance in figuring this out!
vashworth commentedon Oct 17, 2023
I'm going to keep this issue open. I think actionable work for Flutter can be: we can try parsing the scheme settings and checking to ensure these settings are set as expected and if they're not, we can provide messaging to guide users to fix.
NM4ik commentedon Oct 17, 2023
@vashworth
I got u ! :D
Is there anything else required from me?
vashworth commentedon Oct 17, 2023
Nope, I think I have all the information I need. Thanks!
likwifi commentedon Oct 18, 2023
@vashworth after couple times of successful launches with the Debug executable checked,
I'm experiencing same issue again on stable branch.
I've also attached xcresult.
Not sure whats reason for this.
Run-Runner-2023.10.18_19-55-54-+0400.xcresult.zip
likwifi commentedon Oct 18, 2023
after upgrade to flutter version 3.13.7 it works again 🤷♂️
berkaykurkcu commentedon Oct 20, 2023
Seems like the issue still persists and workarounds are not reliable.
Applying @vashworth 's suggestion and running directly from XCode #136197 (comment)
yields "Build Failed" with two issues.
Trying to launch from VS Code however yields a very different result.
However, after launching from VS Code and receiving the error above, navigating to XCode and taking a look inside the Runner's Frameworks folder, I see 'Pods_Runner' written in red.
Simply deleting it and running from XCode again(keep in mind that @vashworth 's suggestion is still applied) somehow successfully launched the app.
Ensure Xcode project is setup to start debugger (#136977)
github-actions commentedon Nov 8, 2023
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 -vand a minimal reproduction of the issue.