Archive iOS, getting error: failed to emit precompiled header

Bitrise Build Issue Report template

Description of the issue

When running the Xcode Archive & Export to iOS step, I get the error “error: failed to emit precompiled header”. I’m using React Native and followed the instructions here to add obj-c bridging headers for the react-native-text-input-mask:
Click on For RN = 0.60.*

Environment:

Where did the issue happen?

The issue happens on bitrise.io using the React Native stack (Xcode 11.1.x, on macOS 10.14.6 (Mojave). I’m able to fully build and archive the app on my local machine.

The step is Xcode Archive & Export for iOS version 2.7.2

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? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Since I’ve tried building and archiving

Local reproduction

I cannot reproduce this locally. On my mac, I’m able to build and archive the project.

Build log

https://app.bitrise.io/build/5244225f00abb6eb#?tab=log

Hi @ecolman,

In case you are using Cocoapods please make sure to build the xcworskpace, not the xcodeproj file.

You can use the Remote Access feature to try to debug the project in the Bitrise build enviroment, as it may not be clear from the logs alone what is causing this problem.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.