简体   繁体   中英

Azure Pipelines job stuck building iOS version of React Native app

I'm trying to build an iOS version of a React Native app using Azure Pipelines. I'm running the build using fastlane's action build_ios_app .

It works on my local machine perfectly fine, but it gets stuck on Azure with the following output:

[08:32:21]: ‌▸‌ ‌Compiling‌ LaunchScreen.xib‌
[08:32:25]: ‌▸‌ ‌Processing‌ Info.plist‌
[08:32:25]: ‌▸‌ ‌Running script‌: Bundle React Native code and images
‌[08:32:32]: ▸ ‌the transform cache was reset.‌

This is usually the step at which the packager is opened in a new terminal window.

On my local machine the output looks a little bit different at this step:

[11:38:15]: ▸ Processing Info.plist
[11:38:15]: ▸ Running script 'Bundle React Native code and images'
[11:38:15]: ▸ Touching Demo.app (in target: Demo)
[11:38:16]: ▸ Archive Succeeded

There is no ‌the transform cache was reset.‌ which indicates node is running out of memory on the Azure at some point?

  • Bundling the app manually (via react-native bundle ... ) works fine though.

Update: Increasing the memory available for nodejs tasks (setting --max-old-space-size=8096 in the NODE_OPTIONS environment variable) makes the job fail (at least) with the following error message:

2019-07-29T09:58:04.6108820Z error: File /Users/vsts/Library/Developer/Xcode/DerivedData/Demo-algdypqdcfcqirejrjxxgvqsmfdv/Build/Intermediates.noindex/ArchiveIntermediates/Demo/BuildProductsPath/Release-iphoneos/Demo.app/main.jsbundle does not exist. This must be a bug with[0m

2019-07-29T09:58:04.6109130Z 
2019-07-29T09:58:04.6109180Z 
2019-07-29T09:58:04.6109640Z [33m▸[0m [39;1mGenerating 'Demo.app.dSYM'[0m
2019-07-29T09:58:04.6109740Z ** ARCHIVE FAILED **
2019-07-29T09:58:04.6109810Z 
2019-07-29T09:58:04.6109850Z 
2019-07-29T09:58:04.6109930Z The following build commands failed:
2019-07-29T09:58:04.6111020Z PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/vsts/Library/Developer/Xcode/DerivedData/Demo-algdypqdcfcqirejrjxxgvqsmfdv/Build/Intermediates.noindex/ArchiveIntermediates/Demo/IntermediateBuildFilesPath/Demo.build/Release-iphoneos/Demo.build/Script-00DD1BFF1BD5951E006B06BC.sh
2019-07-29T09:58:04.6111240Z (1 failure)

Any ideas how to solve this?

I ran into the same issue on my local machine, the solution was to update to the latest version of node js .

I guess your CI environment should be self contained, so version conflicts should not be a problem. But you maybe updated fastlane to a version incompatible with the node on your Azure server without realizing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM