简体   繁体   中英

Fastlane beta build works but snapshot fails to build

I've had good success with the 'fastlane beta' lane to auto build, upload and approve iOS app builds to testflight.

I'm trying to expand usage to include fastlane 'snapshot' to auto generate screenshots. I went through the setup tutorial via fastlane as well as ray wenderlich (just to check it wasn't me being stupid.)...

And it seems to be processing along until it complains about lack of credentials

Authentication failed because no credentials were provided.

But I can't see why this route would fail and 'fastlane beta' works just fine? Any ideas on what I need to change? What credentials could be needed here when none were needed for 'beta' lane?
Or why one path works and the other fails during (the same??) build?

Terminal messages:

[00:17:22]: Building and running project - this might take some time...

[00:17:23]: Patching simulators .../com.apple.iphonesimulator.plist' to scale to 100%

[00:17:24]: Using device named 'iPhone 11 Pro Max' with version '13.3' because no match was found for version '13.2'

[00:17:24]: Running snapshot on: iPhone 11 Pro Max

[00:17:24]: $ set -o pipefail && xcodebuild -workspace ./Power\ Zone\ Timer.xcworkspace -scheme Power\ Zone\ Timer -derivedDataPath '/var/folders/qs/cyr14d9n3zj11p5bcnr4vdh00000gn/T/snapshot_derived20200414-75065-4n5afc' -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=13.3' FASTLANE_SNAPSHOT=YES build test | tee /Users/xxx/Library/Logs/snapshot/Challenges-Power\ Zone\ Timer.log | xcpretty 

[00:17:24]: ▸ Loading...

[00:17:30]: ▸ xcodebuild: error: Could not resolve package dependencies:

[00:17:30]: ▸   Authentication failed because no credentials were provided.
xcodebuild: error: Could not resolve package dependencies:
  Authentication failed because no credentials were provided.

[00:17:30]: Exit status: 74

Do you have a Snapfile setup? Here is one I use.

devices([ "iPhone 11"])
languages([ "en-US" ])
clean false
clear_previous_screenshots true
concurrent_simulators false
configuration "Debug"
erase_simulator false
launch_arguments([ "ADS_DISABLED" ])
localize_simulator true
namespace_log_files true
output_directory "./fastlane/screenshots/"
output_simulator_logs true
reinstall_app false
result_bundle false
scheme "MyApp Free"
skip_open_summary true
stop_after_first_error true
workspace "./MyApp.xcworkspace"

It turns out that issue was with a package installed via Swift Package Manager:

Once I uninstalled SDWebImage (that I'd installed with Swift Package Manager in Xcode) and re-installed it via CocoaPods, it now builds okay.

No authentication or anything set up via CocoaPods (or SPM for that matter.) - so seems specific to SPM. But it is strange given Fastlane Beta was fine, Suggests slightly different build paths for some reason, but at this point I've given up trying to figure out why and am just pleased it is working!

Hope it helps anyone else that comes across similar issues with Fastlane Snapshot failing when Fastlane Beta works fine!

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