Github Actions 自托管本地 macOS 机器 iOS 构建失败并显示“设备受密码保护”

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

我正在使用 GitHub 自托管操作在我的本地开发机器上运行,以便在我的机器运行时节省免费积分。它大部分时间都有效,但有时会遇到此错误:

▸ Compiling CapacitorCamera_vers.c
▸ Compiling CapacitorCamera-dummy.m
▸ Compiling CameraPlugin.m
▸ Linking CapacitorCamera
2023-04-03 08:35:49.523 xcodebuild[36930:562246]  DTDKRemoteDeviceConnection: Failed to start remote service "com.apple.mobile.notification_proxy" on device. Error: Error Domain=com.apple.dtdevicekit Code=811 "Failed to start remote service "com.apple.mobile.notification_proxy" on device." UserInfo={NSUnderlyingError=0x6000037782d0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653158 "The device is passcode protected." UserInfo={MobileDeviceErrorCode=(0xE800001A), com.apple.dtdevicekit.stacktrace=(
    0   DTDeviceKitBase                     0x00000001124acb1c DTDKCreateNSErrorFromAMDErrorCode + 300
    1   DTDeviceKitBase                     0x00000001124b90c4 __63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 376
    2   DTDeviceKitBase                     0x00000001124b8944 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 28
    3   DTDeviceKitBase                     0x00000001124aec58 __DTDKExecuteInSession_block_invoke_2 + 48
    4   DTDeviceKitBase                     0x00000001124ae358 __DTDKExecuteWithConnection_block_invoke_2 + 216
    5   DTDeviceKitBase                     0x00000001124ae250 __DTDKExecuteWithConnection_block_invoke + 116
    6   libdispatch.dylib                   0x0000000190906504 _dispatch_client_callout + 20
    7   libdispatch.dylib                   0x0000000190915a9c _dispatch_lane_barrier_sync_invoke_and_complete + 56
    8   DVTFoundation                       0x0000000106753150 DVTDispatchBarrierSync + 148
    9   DVTFoundation                       0x000000010672e288 -[DVTDispatchLock performLockedBlock:] + 60
    10  DTDeviceKitBase                     0x00000001124ae148 DTDKExecuteWithConnection + 200
    11  DTDeviceKitBase                     0x00000001124aeb00 DTDKExecuteInSession + 228
    12  DTDeviceKitBase                     0x00000001124b87a0 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 128
    13  DVTFoundation                       0x0000000106752428 __DVT_CALLING_CLIENT_BLOCK__ + 16
    14  DVTFoundation                       0x0000000106752e94 __DVTDispatchAsync_block_invoke + 152
    15  libdispatch.dylib                   0x00000001909049dc _dispatch_call_block_and_release + 32
    16  libdispatch.dylib                   0x0000000190906504 _dispatch_client_callout + 20
    17  libdispatch.dylib                   0x000000019090dbbc _dispatch_lane_serial_drain + 672
    18  libdispatch.dylib                   0x000000019090e73c _dispatch_lane_invoke + 436
    19  libdispatch.dylib                   0x000000019091934c _dispatch_workloop_worker_thread + 652
    20  libsystem_pthread.dylib             0x0000000190a8a100 _pthread_wqthread + 288
    21  libsystem_pthread.dylib             0x0000000190a88e20 start_wqthread + 8
), DVTRadarComponentKey=261622, NSLocalizedDescription=The device is passcode protected.}}, NSLocalizedRecoverySuggestion=Please check your connection to your device., DVTRadarComponentKey=261622, NSLocalizedDescription=Failed to start remote service "com.apple.mobile.notification_proxy" on device.}
▸ Compiling ByteowlsCapacitorOauth2_vers.c
▸ Compiling ByteowlsCapacitorOauth2.m
▸ Compiling ByteowlsCapacitorOauth2-dummy.m
▸ Linking ByteowlsCapacitorOauth2
▸ Generating 'CapacitorCamera.framework.dSYM'
▸ Generating 'ByteowlsCapacitorOauth2.framework.dSYM'
▸ Touching CapacitorCamera.framework (in target 'CapacitorCamera' from project 'Pods')

我正在使用 Fastlane 来自动化这个构建过程。我想也许模拟器必须在构建过程中打开,但这并没有什么不同。

我在 xcode 中注意到我的真实(网络连接)设备被锁定。但我不确定为什么 xcodebuild 会在构建过程中尝试使用我的真实设备?

编辑:如果我取消配对我的设备以将其从等式中移除,它现在会失败并出现无用的错误。请注意,它在同一台机器上的 xcode 中构建良好。

Compiling Main.storyboard
▸ Compiling LaunchScreen.storyboard
▸ Compiling App_vers.c
▸ Linking App
▸ Processing Info.plist
▸ Running script '[CP] Embed Pods Frameworks'
▸ Generating 'App.app.dSYM'
    Run script build phase '[CP] Copy XCFrameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FBSDKCoreKit_Basics' from project 'Pods')
    Run script build phase '[CP] Copy XCFrameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FBAEMKit' from project 'Pods')
    Run script build phase '[CP] Copy XCFrameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FBSDKCoreKit' from project 'Pods')
    Run script build phase '[CP] Copy XCFrameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'FBSDKLoginKit' from project 'Pods')
** ARCHIVE FAILED **


The following build commands failed:
    PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/alex/Library/Developer/Xcode/DerivedData/App-fclsinyvecksxwgujqmhxodzehpd/Build/Intermediates.noindex/ArchiveIntermediates/App/IntermediateBuildFilesPath/App.build/Release\ Dev-iphoneos/App.build/Script-9592DBEFFC6D2A0C8D5DEB22.sh (in target 'App' from project 'App')
(1 failure)
[09:57:45]: Exit status: 65

[!] Error building the application - see the log above
npm ERR! Lifecycle script `native:deploy:ios:development` failed with error: 
npm ERR! Error: command failed 
ios github-actions fastlane github-actions-self-hosted-runners fastlane-gym
© www.soinside.com 2019 - 2024. All rights reserved.