New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any lane failing with code 65 (error: Unexpected duplicate tasks) #20104
Comments
So what's the solution? |
Is there any fix or should we abandon Fastlane.Swift altogether at the moment? |
I just started my fastlane integration and noticed, that fastlane asks on lane execution if I want to update the FastlaneSwiftRunner project. If I deny this fastlane runs, if I accept it, I get this error. So I added fastlane swift to my project and will run for now with |
Thank you for this tip. With |
fastlane snapshot --disable_runner_upgrades |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
@danipralea I have Xcode 13.2.1 and have the same problem. Even --disable_runner_upgrades does not solve the problem |
If you run the underlying
The underlying Fastlane project has two copy files phase that both copy the same file: Both copy phases do exactly the same thing, the only difference being their name. I was able to get my fastlane scripts to run by deleting either one of the phases, which of course makes fastlane complain that it's not up to date. I would assume this is a bug in the implement of |
Facing the same issues. The runner is being upgraded every few days but the error remains. Can we simply just open a PR to remove the redundant copying step? |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
@4rihant it seems likely that will fix the issue but it's hard to say without one of the core contributors weighing in. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with This issue will be auto-closed if there is no reply within 1 month. |
The issue seems to remain as of now |
I think what would fix this is the I haven't had a chance to build and test this, but roughly, in this part of def add_missing_copy_phase!(dry_run: false)
# Check if upgrade is needed
# If fastlane copy files build phase exists already, we don't need any more changes to the Xcode project
phase_copy_sign = self.fastlane_runner_target.copy_files_build_phases.select { |phase_copy| phase_copy.name == "FastlaneRunnerCopySigned" }.first
old_phase_copy_sign = self.fastlane_runner_target.shell_script_build_phases.select { |phase_copy| phase_copy.shell_script == "cd \"${SRCROOT}\"\ncd ../..\ncp \"${TARGET_BUILD_DIR}/${EXECUTABLE_PATH}\" .\n" }.first
# ⚠️⚠️⚠️⚠️ ADD THIS 👇🏻 ⚠️⚠️⚠️⚠️
other_old_phase_copy_sign = self.fastlane_runner_target.copy_files_build_phases.select { |phase_copy| phase_copy.name != "FastlaneRunnerCopySigned" }.first
return true if dry_run && phase_copy_sign.nil?
return false if dry_run
# Proceed to upgrade
old_phase_copy_sign.remove_from_project unless old_phase_copy_sign.nil?
# ⚠️⚠️⚠️⚠️ AND THIS 👇🏻 ⚠️⚠️⚠️⚠️
other_old_phase_copy_sign.remove_from_project unless other_old_phase_copy_sign.nil?
[... rest of function ...]
end ALTERNATIVELYIt occurred to me while writing the above fix, that if the xcode project that comes with fastlane already has a proper |
This is still the problem unfortunately ;O |
Same problem here. `iMac-Argus:Motiv-iOS-Sources argus$ fastlane -v iMac-Argus:Motiv-iOS-Sources argus$ fastlane test --disable_runner_upgrades ❌ error: Unexpected duplicate tasks ❌ error: Unexpected duplicate tasks ** BUILD FAILED ** |
@KrauseFx can we get some eyes from the team on this issue to understand the ideal solution for the duplicated task warning within the Build Phases? |
Any update on this? |
Hello 👋 Thank you for providing plenty of details related to the issue. It's been very helpful. You can find the pull request with a fix here: #21621. Feel free to take it for a spin by pinning your // Gemfile
gem 'fastlane', git: 'https://github.com/fastlane/fastlane.git', branch: 'fix-swift-unexpected-duplicate-tasks' |
New Issue Checklist
Issue Description
Using Fastlane Swift!
Fail running any lane, no matter even if it's empty, with a very generic error:
Command executed
bundle exec fastlane custom --verbose
Complete output when running fastlane, including the stack trace and command used
Captured Output
Command Used:
aLane --verbose --capture_output
Output/Log
🚫 fastlane environment 🚫
Stack
System Locale
fastlane files:
`./fastlane/Fastfile.swift`
No Appfile found
fastlane gems
Loaded fastlane plugins:
Loaded gems
generated on: 2022-03-23
EDIT:
I have struggled an entire day with this. I think I might know at least the root cause of it. Not sure how to fix it yet though.
App-FastlaneRunner.log
Later EDIT:
I have removed
FastlaneRunner
from Build Phases -> Copy Files section and it finally made the error go away, but I am unsure of the implicationsI have this behaviour on an M1 mac. I have an intel based macbook as well and I got paranoid and did a fresh install of the OS and was able to reproduce it there as well. Not sure how other people are not getting it either, or if I am doing something wrong. But I am just doing the most basic steps and able to repro every time 🤷♂️
Last EDIT (I promise):
It's most probably an Xcode issue. more specifically - the latest one (13.3)
I built it with Xcode 13.0 and it doesn't have the Copy resources option, like 13.3 has
The text was updated successfully, but these errors were encountered: