Why does fastlane build to testflight keep failing on archive? - xcode

I haven't changed my fastlane config at all from times it was working. But now after sometime when I needed to do another build it fails now on this part. What should I do here?
This is the following I'm getting.
[15:42:40]: ▸ Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'app' from project 'app')
[15:42:40]: ▸ Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'app' from project 'app')
[15:42:40]: ▸ Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'app' from project 'app')
[15:42:40]: ▸ ** ARCHIVE FAILED **
[15:42:40]: Exit status: 65
This is the fast lane config that is being used.
desc "Push a new beta build to TestFlight"
lane :beta do
increment_build_number(xcodeproj: "app.xcodeproj")
#sync_code_signing
build_app(workspace: "app.xcworkspace", scheme: "app", export_options: {
provisioningProfiles: {
"com.app.app" => "vahStoreProf",
}
}, xcargs: "-allowProvisioningUpdates")
# Changed to update_code_signing_settings from enable_automatic_code_signing since it was deprecated
update_code_signing_settings(path: "app.xcodeproj")
upload_to_testflight
end

It's a known issue affecting recent versions of Fastlane running combined with Xcode 14 and/or macOS 13.
You can check open issues:
https://github.com/fastlane/fastlane/issues/20810
https://github.com/fastlane/fastlane/issues/20825
https://github.com/fastlane/fastlane/issues/20800
For the time being, the only solution I found in my project is locking a lower version of Xcode in the Fastfile, eg:
xcode_select("/Applications/Xcode_13.4.1.app")
In case you're running your pipeline on Github, choosing your environment can be relatively easy (easier than downgrading your local machine). Depending on your Github runtime, you may have different versions of Xcode installed. Assuming you're on macOS-latest (macOS 12), here is a list of available Xcode versions.

Add
gym(
....
xcargs: "CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM="
}
To resolve the issue.

Related

EAS Expo development build succeeds, but production build fails

I am able to build a "development" build using eas build --profile development --platform ios and equally eas build --profile development --platform ios --local
However, production fails using eas build --profile production --platform ios and equally eas build --profile production --platform ios --local
I am using a managed workflow (custom development client) and eas-cli/2.8.0 darwin-arm64 node-v16.15.0, expo version 46
eas.json
{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
},
"android": {
"buildType": "apk"
}
},
"production": {},
"dev-device": {
"developmentClient": true,
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"build": {}
},
"cli": {
"version": ">= 0.48.2"
}
}
The error message unfortunately doesn't help - the actual error seems to be omitted, as the output is blank right after This must be a bug with
[RUN_FASTLANE]
⚠️ (/Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/Headers/EXNativeModulesProxy.h:35:161)
33 | - (nonnull instancetype)initWithCustomModuleRegistry:(nonnull EXModuleRegistry *)moduleRegistry;
34 |
> 35 | - (void)callMethod:(NSString *)moduleName methodNameOrKey:(id)methodNameOrKey arguments:(NSArray *)arguments resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
| ^ block pointer is missing a nullability type specifier [-Wnullability-completeness]
36 |
37 | #end
38 |
[RUN_FASTLANE] › Linking <projectname> » <projectname>
[RUN_FASTLANE] ⚠️ ld: method '+moduleName' in category from /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/ExpoModulesCore(ExpoBridgeModule-80aa35da68a4e1df6bb30c3c482a2b01.o) overrides method from class in /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/ExpoModulesCore/ExpoModulesCore.framework/ExpoModulesCore(ExpoBridgeModule-5220cf34e840cf7b0d23a3f2cb8765f5.o)
[RUN_FASTLANE] ⚠️ ld: method '+UIStatusBarAnimation:' in category from /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/RNScreens/RNScreens.framework/RNScreens(RNSScreen.o) conflicts with same method from another category
[RUN_FASTLANE] › Generating debug <projectname> » <projectname>.app.dSYM
[RUN_FASTLANE] › Executing <projectname> » Bundle React Native code and images
[RUN_FASTLANE] the transform cache was reset.
[RUN_FASTLANE]
❌ error: File /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/BuildProductsPath/Release-iphoneos/<projectname>.app/main.jsbundle does not exist. This must be a bug with
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'abseil' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Libuv-gRPC' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'BoringSSL-GRPC' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-bridging' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-Core' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
[RUN_FASTLANE] Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'gRPC-C++' from project 'Pods')
[RUN_FASTLANE] Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/IntermediateBuildFilesPath/<projectname>.build/Release-iphoneos/<projectname>.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target '<projectname>' from project '<projectname>')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/michael/Library/Developer/Xcode/DerivedData/<projectname>-gcqxmmzlobuldzayqgevdgwkkbet/Build/Intermediates.noindex/ArchiveIntermediates/<projectname>/IntermediateBuildFilesPath/<projectname>.build/Release-iphoneos/<projectname>.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target '<projectname>' from project '<projectname>')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65
[RUN_FASTLANE]
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | Build environment |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE] | xcode_path | /Applications/Xcode.app |
[RUN_FASTLANE] | gym_version | 2.211.0 |
[RUN_FASTLANE] | sdk | iPhoneOS16.1.sdk |
[RUN_FASTLANE] +-------------+-------------------------+
[RUN_FASTLANE]
[RUN_FASTLANE] Looks like fastlane ran into a build/archive error with your project
[RUN_FASTLANE] It's hard to tell what's causing the error, so we wrote some guides on how
[RUN_FASTLANE] to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[RUN_FASTLANE] Before submitting an issue on GitHub, please follow the guide above and make
[RUN_FASTLANE] sure your project is set up correctly.
[RUN_FASTLANE] fastlane uses `xcodebuild` commands to generate your binary, you can see the
[RUN_FASTLANE] the full commands printed out in yellow in the above log.
[RUN_FASTLANE] Make sure to inspect the output above, as usually you'll find more error information there
[RUN_FASTLANE]
[RUN_FASTLANE] [!] Error building the application - see the log above
[RUN_FASTLANE] Error: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
[CLEAN_UP_CREDENTIALS] Destroying keychain - /var/folders/lz/vn3ps0t51nv5q2g7q4kppt1r0000gn/T/turtle-v2-8afb540c-5bfc-4d59-886b-a08cb4540d11.keychain
[CLEAN_UP_CREDENTIALS] Removing provisioning profile
Build failed
Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
Error: npx exited with non-zero code: 1
❯ eas build --profile production --platform ios --local
Turns out, for the build to consider the latest code changes, they need to be committed. Local changes are not sufficient
Buried in some XCode logs an import was missing; the actual error wasn't showing in the logs outputted on the CLI (in my case it was a faulty import, which was fixed, but not committed to git)

Go CI does not recognize build file for gradle

I have setup GO CI pipeline for continuous integration in my project. I tried to add a project that is built using gradle. I tried a add gradle task for building my application.
While executing build it shows that
FAILURE: Build failed with an exception.
* What went wrong:
Task 'build' not found in root project 'Gradlepipelinejob'.
I tried to add defaultTasks 'clean', 'compile' to the parent build.gradle file. But still the same error exists. Someone pls help me in resolving this issue.
I think 'build' should be in Command section, rather than arguments. Even after that if it doesn't works, try executing build commands in the agent terminal(or any command prompt).This will let you figure out whether the error is in server or agent.
GO CI runs the command in the code checkout directory so please check if your gradle file is present or not in that directory

Build dependencies with TeamCity

I have to build: Internet & Common. I would like that when I click on "Run" for the "Internet" build that the "Common" build executes first.
Is it possible ? I saw artifact dependencies, but I don't need any data to be copied, I just want to build "Common" before "Internet" every time a build for "Internet" is requested.
Thanks
If they're using the same VCS root, then configuring a snapshot dependency between the "Internet" build configuration and the "Common" build configuration will enable you to do that; this basically ensures that all the dependencies are built from the same snapshot of the VCS.
If you must have the "Common" build execute regardless of its current state, then uncheck the default 'Do not run new build if there is a suitable one' option. This will ensure "Common" is run every time you hit Run on "Internet".

Xcode 6 running custom shell scripts

When I build my target, in the information tab I can see the scheme building and the target building. At the end of the process it runs 2 custom shell scripts.
I can't find where the target or project is running these 2 custom shell scrips. I've looked at target > build phases and it's not being set to run there. I also looked at project > build settings but I can't locate it there.
I don't want to run these scripts but I don' know how to remove them! Any help would be great! Thanks
yup but I know the pods project or targets are not set to run scripts. I've inherited this project on our jenkins it runs 2 scripts at the end of the build. I've removed it from jenkins but not sure how to remove it from the project.
Pods run scripts. Here's the two scripts being run:
If you don't want to use pods anymore, use this pods-deintegrate plugin to remove all traces of pods.

Failed build trigger in team city TeamCity

Is it possible to Trigger an exe to run on a failed build? Can you do this within Team City?
If you specifically want the failed builds, you can set up the dependent build as Eric said, and have that secondary buildscript use the REST API to pull up a list of the failed builds for the actual project.
If the latest build is in that failed builds list, then tell the build script to run the executable. If not, then you're all done!
http://confluence.jetbrains.net/display/TW/REST+API+Plugin
I don't think it's possible to trigger an executable to run only on failed TeamCity builds. TeamCity usually allows you to do things either always or only upon successful builds.
It would be possible to trigger an executable to run after this build is finished (failed or successful).
If that would work for you, you could set up a new build configuration that runs the executable. The new build configuration would have a "finish build" trigger. This would cause the executable to be run whenever the other build is completed.
You should add another build step with the exe you want to run and set the correct option to execute.execution options

Resources