Flutter / XCode:应用程序在构建后立即关闭并失去与调试器的连接“在“..”iOS 17.3 上失去与调试器的连接

问题描述 投票:0回答:1

将我的 iPhone 升级到 iOS 17.3 后,我遇到了无法再次在我的设备上正常构建应用程序的问题。 是用 flutter 制作的 它立即大喊一声,XCode 给我消息“失去了与 iPhone 上调试器的连接”。 该应用程序在 Android 手机上正常运行。当我从 testflight 下载版本时也是如此。 完整的错误是:

Lost connection to the debugger on “iPhone”.
Domain: IDEDebugSessionErrorDomain
Code: 22
Recovery Suggestion: Restore the connection to “iPhone” and run “Runner” again, or if “Runner” is still running, you can attach to it by selecting Debug > Attach to Process > Runner.
User Info: {
    DVTErrorCreationDateKey = "2024-01-25 11:14:48 +0000";
    IDERunOperationFailingWorker = DBGLLDBLauncher;
}
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone11,8";
    "device_osBuild" = "17.3 (21D50)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "355.7.7";
    "dvt_mobiledevice_version" = "1643.60.2";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 2;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 62043;
    "operation_errorCode" = 22;
    "operation_errorDomain" = IDEDebugSessionErrorDomain;
    "operation_errorWorker" = DBGLLDBLauncher;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 8192;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos17.2";
    "sdk_osVersion" = "17.2";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.3 (Build 23D56)
Xcode 15.2 (22503) (Build 15C500b)
Timestamp: 2024-01-25T12:14:48+01:00

我已经更新了我的 mac 版本并重置了我的手机。 我多次删除了手机上的应用程序,并尝试再次在我的设备上构建它。 我还删除了

Library/Developer/Xcode
下的派生文件。 我也重新安装了XCode。

有人有同样的问题吗

flutter xcode debugging ios17
1个回答
0
投票

对我有帮助的是所有事物的互联解决方案: 如果您的应用程序没有关闭是因为像评论中提到的 levgen 这样的内存消耗,而不是因为电缆损坏,您可以尝试此操作(也许您不需要任何这些步骤): 0.删除导出的数据(在Mac上:CMD + shift + k)

  1. flutter upgrade
  2. 确保在XCode中的
    Debug executable
    下设置了
    Product > Scheme > Edit Scheme
    ,并且可执行文件设置为默认的Runner.app
  3. flutter channel stable
  4. flutter pub get
  5. pod install --repo-update
  6. 在 XCode 中构建应用程序,然后在 vscode 中尝试(如果使用)

我还建议首先使用新的 flutter 项目进行测试。例如,我还收到错误消息“连接到服务协议时出错:无法连接到 http://127.0.0.1:1039/ #58588”。在那里它帮助重新启动计算机。

它仍然需要很多时间来构建,并且在启动后几分钟后崩溃,但至少现在它创建了它。

有帮助的来源:

© www.soinside.com 2019 - 2024. All rights reserved.