Build issue using fastlane failed on Jenkins

爱⌒轻易说出口 提交于 2019-12-08 11:46:14

问题


I am facing an issue. Build is failing while archiving it succeeded successfully. Below the Jenkins log:

    [33m▸[0m [39;1mProcessing[0m Info.plist
[33m▸[0m [39;1mGenerating 'MyApp.app.dSYM'[0m
[33m▸[0m [39;1mRunning script[0m 'Run Script'
[33m▸[0m [39;1mCopying[0m /Users/sanoj/Library/Developer/Xcode/DerivedData/MyApp-ehrdzbsrtcthuraipdvlkghvcjyx/Build/Intermediates.noindex/ArchiveIntermediates/adhoc/BuildProductsPath/Release-iphoneos/pop.framework
[33m▸[0m [39;1mSigning[0m /Users/sanoj/Library/Developer/Xcode/DerivedData/MyApp-ehrdzbsrtcthuraipdvlkghvcjyx/Build/Intermediates.noindex/ArchiveIntermediates/adhoc/InstallationBuildProductsLocation/Applications/MyApp.app/Frameworks/pop.framework
** ARCHIVE FAILED **


The following build commands failed:
CodeSign /Users/sanoj/Library/Developer/Xcode/DerivedData/MyApp-ehrdzbsrtcthuraipdvlkghvcjyx/Build/Intermediates.noindex/ArchiveIntermediates/adhoc/InstallationBuildProductsLocation/Applications/MyApp.app/Frameworks/pop.framework
(1 failure)
[16:06:32]: [31mExit status: 65[0m

+---------------+-------------------------+
|            [32m[33mBuild environment[0m            |
+---------------+-------------------------+
| xcode_path    | /Applications/Xcode.app |
| gym_version   | 2.104.0                 |
| export_method | enterprise              |
| sdk           | iPhoneOS11.4.sdk        |
+---------------+-------------------------+

[16:06:32]: ▸ [35mSigning Identity:     "iPhone Distribution: Network, Inc."[0m
[16:06:32]: ▸ [35m    /usr/bin/codesign --force --sign 6A0EAAC1D162CA8CEE05F09EF98171DF5 --preserve-metadata=identifier,entitlements,flags --timestamp=none /Users/sanoj/Library/Developer/Xcode/DerivedData/MyApp-ehrdzbsrtcthuraipdvlkghvcjyx/Build/Intermediates.noindex/ArchiveIntermediates/adhoc/InstallationBuildProductsLocation/Applications/MyApp.app/Frameworks/pop.framework[0m
[16:06:32]: ▸ [35m/Users/sanoj/Library/Developer/Xcode/DerivedData/MyApp-ehrdzbsrtcthuraipdvlkghvcjyx/Build/Intermediates.noindex/ArchiveIntermediates/adhoc/InstallationBuildProductsLocation/Applications/MyApp.app/Frameworks/pop.framework: errSecInternalComponent[0m
[16:06:32]: ▸ [35mCommand /usr/bin/codesign failed with exit code 1[0m
[16:06:32]: 
[16:06:32]: [31m⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error[0m
[16:06:32]: [33m📋  For the complete and more detailed error log, check the full log at:[0m
[16:06:32]: [33m📋  /Users/sanoj/Library/Logs/gym/MyApp-adhoc.log[0m
[16:06:32]: 
[16:06:32]: [31mLooks like fastlane ran into a build/archive error with your project[0m
[16:06:32]: [31mIt's hard to tell what's causing the error, so we wrote some guides on how[0m
[16:06:32]: [31mto troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/[0m
[16:06:32]: [31mBefore submitting an issue on GitHub, please follow the guide above and make[0m
[16:06:32]: [31msure your project is set up correctly.[0m
[16:06:32]: [31mfastlane uses `xcodebuild` commands to generate your binary, you can see the[0m
[16:06:32]: [31mthe full commands printed out in yellow in the above log.[0m
[16:06:32]: [31mMake sure to inspect the output above, as usually you'll find more error information there[0m
[16:06:32]: 
+------------------+----------+
|        [33mLane Context[0m         |
+------------------+----------+
| DEFAULT_PLATFORM | ios      |
| PLATFORM_NAME    |          |
| LANE_NAME        | ci       |
| BUILD_NUMBER     | 1.14.467 |
| VERSION_NUMBER   | 1.14     |
+------------------+----------+
[16:06:32]: [31mError building the application - see the log above[0m

+------+---------------------------------+-------------+
|                   [32mfastlane summary[0m                   |
+------+---------------------------------+-------------+
| Step | Action                          | Time (in s) |
+------+---------------------------------+-------------+
| 1    | default_platform                | 0           |
| 2    | Switch to configure lane        | 0           |
| 3    | app_name                        | 0           |
| 4    | update_app_identifier           | 0           |
| 5    | increment_build_number          | 1           |
| 6    | increment_version_number        | 1           |
| 7    | Switch to distribution_app lane | 0           |
| 💥   | [31mgym[0m                             | 118         |
+------+---------------------------------+-------------+

[16:06:32]: [31mfastlane finished with errors[0m
[31m
[!] Error building the application - see the log above[0m
Build step 'Execute shell' marked build as failure
Archiving artifacts
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /Users/sanoj/jenkins/workspace/MyApp-1.14/fastlane/xcov_report to /JENKINS_HOME/home/jobs/MyApp-1.14/htmlreports/Code_Coverage_Report
Build step 'Upload to HockeyApp' marked build as failure
Finished: FAILURE

回答1:


TroubleShooting steps:

  1. Check you are using correct scheme. Scheme should be exist in Xcode configuration.
  2. Use manual Signing Style reason is it require permission for Signing.
  3. Move your certificate from login to System from Keychain.
  4. Change configuration Enterprise to enterprise.


来源:https://stackoverflow.com/questions/52187300/build-issue-using-fastlane-failed-on-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!