Xcode Build -> Archive Failed

#1

Bitrise Build Issue Report template

Description of the issue

I’m having this issue when building iOS app… I was working in pervious month and it started happening just today… I removed Cache:Pull and Cache:Push steps and it’s still failing…

Environment:

Where did the issue happen?

xcode-archive

Which build Step causes the issue and which version of the step?

E.g.: Git Clone v3.6.0

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? :
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : 21 Oct 2020

Local reproduction

I can build archive successfully in my mac.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Last lines of the Xcode’s build log:
^~~~~~~~~~~~~
<pb_encode.h>
/Users/vagrant/git/Pods/Target Support Files/nanopb/nanopb-umbrella.h:22:9: error: double-quoted include “pb_common.h” in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import “pb_common.h”
^~~~~~~~~~~~~
<pb_common.h>
13 errors generated.
In file included from /Users/vagrant/git/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c:20:
/Users/vagrant/git/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h:22:10: fatal error: could not build module ‘nanopb’
#include <nanopb/pb.h>

14 errors generated.
** ARCHIVE FAILED **
The following build commands failed:
   SwiftCodeGeneration normal arm64
   CompileC /Users/vagrant/Library/Developer/Xcode/DerivedData/FWD-bgxcgmvhimechibzxpkdigppmysq/Build/Intermediates.noindex/ArchiveIntermediates/FWD/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/GoogleDataTransport.build/Objects-normal/arm64/cct.nanopb.o /Users/vagrant/git/Pods/GoogleDataTransport/GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
You can find the last couple of lines of Xcode's build log above, but the full log is also available in the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
(value: /Users/vagrant/deploy/raw-xcodebuild-output.log)
Archive failed, error: exit status 65
0 Likes

#2

We have the same problem here, our apps start to failed with the same error.
There is a issue with Cocoapod and Xcode 12, but we are using xcode 11.2.x or 11.6.x for building.

There is any workaround or a solution for this?

Thanks in advance

0 Likes

#4

Same problem here as well. Quite frustrating as I am trying to prove that Bitrise is a good solution, but I can not even get a simple build to work due this issue.

Build log

Last lines of the Xcode’s build log:
^~~~~~~~~~~~~
<pb_encode.h>
/Users/vagrant/git/Pods/Target Support Files/nanopb/nanopb-umbrella.h:22:9: error: double-quoted include “pb_common.h” in framework header, expected angle-bracketed instead [-Werror,-Wquoted-include-in-framework-header]
#import “pb_common.h”
^~~~~~~~~~~~~

0 Likes

#5

Found the error… Xcode 12 and cocoapod has a conflict… update your pod to version 1.10.0 will fix the problem

1 Like

#6

Thank you, however…

We are using Xcode 11.7 with CocoaPods 1.9.3. and have the same error.

2 Likes

#7

Hello, have you found the solution?
We have tried to update the pod to version 1.10.0 but the error still occurs.
The Xcode version we are using is 11.7 on bitrise

1 Like

#8

Hi @kevinlee
Can you please provide the build URL and enable Support Access?

Thanks
Chaitanya

0 Likes

#9

manage to fix this by adding this code on my podfile

     post_install do |pi|
          pi.pods_project.targets.each do |t|
              t.build_configurations.each do |config|
                  config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
              end
          end
      end
0 Likes