bytedance / Fastbot_iOS

About Fastbot(2.0) is a model-based testing tool for modeling GUI transitions to discover app stability problems
Other
556 stars 112 forks source link

[问题] test/build 错误 #73

Closed defnngj closed 2 years ago

defnngj commented 2 years ago
2022-01-04 16:20:05.569808+0800 FastbotRunner-Runner[311:6031] Running tests...
2022-01-04 16:20:05.669111+0800 FastbotRunner-Runner[311:6031] 未能载入软件包“FastbotRunner”,因为它已损坏或丢失必要的资源。 请尝试重新安装软件包。
2022-01-04 16:20:05.669213+0800 FastbotRunner-Runner[311:6031] (dlopen_preflight(/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/FastbotRunner): Library not loaded: @rpath/FastbotLib.framework/FastbotLib
  Referenced from: /var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/FastbotRunner
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
    /private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
    /private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
defnngj commented 2 years ago

找到了解决办法:

给依赖的框架签名.

codesign -f -s "Apple Development: you email" /Users/path/github/Fastbot_iOS/Fastbot-iOS/fastbot/FastbotLib.framework/FastbotLib