Closed joncursi closed 6 years ago
@KrauseFx any ideas on this one? This is new.. I wonder if it crept in on one of the recent versions of fastlane
. I deployed using the same script just fine about a week ago, but the last few times I tried (fastlane
has been updated since then) it hangs here.
Hey @joncursi - apologies for this issue! Is there any chance you could run this again with --verbose
? Thanks!
same problem, need help
If you can add in the --verbose
flag and post the output, that should help us debug this issue 👍
So, apparently this: https://github.com/fastlane/fastlane/blob/6b92da6056528d32871832a89c9fe7850b9a5cfc/fastlane/lib/fastlane/actions/app_store_build_number.rb is where it happens. I have no idea why, I tried it with fastlane 2.60 - up to 2.64.1 but all with the same result. I tried to add --verbose
flag like that:
bundle exec fastlane ios beta --verbose
but i don't get a verbose output - not sure what I'm doing wrong.
Maybe as an aside - the same stuff worked yesterday. I tried to delete all testflight versions except for the most recent one but same result :(
Maybe something changed on apples side?
just today I had the same problem. Couldn't fetch the build version from iTunes Connect, using this:
latest_testflight_build_number
Same issue. latest_testflight_build_number always returns default value. No matter which 'version' to pass as parameter. Updated fastlane to latest 2.64.1 and fastlane-plugin-versioning to latest 0.3.1
I think we can close this. After upgrading fastlane to latest version 2.66.0 it fetches the correct build number again! 🎉
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 fastlane
version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
as of 2.75.1
i'm still getting this which is strange
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 fastlane
version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Closing this as it seems to be working okay. The "You have to specify a new version number, as there are multiple to choose from" is a prompt to choose which app version if there are multiple.
New Issue Checklist
Issue Description
latest_testflight_build_number
hangs on the following error:Complete output when running fastlane, including the stack trace and command used
Environment
✅ fastlane environment ✅
### Stack | Key | Value | | --------------------------- | ------------------------------------------- | | OS | 10.12.6 | | Ruby | 2.4.2 | | Bundler? | true | | Git | git version 2.13.1 | | Installation Source | ~/.rvm/gems/ruby-2.4.2/bin/fastlane | | Host | Mac OS X 10.12.6 (16G29) | | Ruby Lib Dir | ~/.rvm/rubies/ruby-2.4.2/lib | | OpenSSL Version | OpenSSL 1.1.0f 25 May 2017 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 9.0.1 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | | | | LANGUAGE | | | ### fastlane files:`./fastlane/Fastfile`
```ruby # README: https://github.com/fastlane/fastlane/tree/master/fastlane/docs # All available actions: https://docs.fastlane.tools/actions # can also be listed using the `fastlane actions` command # CONFIG ------------------------------------------------------------------------------------------- # Load custom actions # See: https://blog.hedgehoglab.com/android-dev-fastlane-review actions_path './actions' # Automatically update fastlane if a new version is available update_fastlane # Enforce a minimum fastlane version fastlane_version "2.63.0" # Enforce a minimum ruby version ruby_version "2.4.2" # ENVIRONMENT VARS --------------------------------------------------------------------------------- # iOS PATH_TO_IOS = "./ios" PATH_TO_XCODE_PROJECT = "#{PATH_TO_IOS}/redbirdNative.xcodeproj" # Android PATH_TO_ANDROID = "./android" PATH_TO_GRADLE_BUILD = "#{PATH_TO_ANDROID}/app/build.gradle" # GENERIC ------------------------------------------------------------------------------------------ def prebuild(lane: lane) # Ensure we're on the master branch ensure_git_branch # Configure Slack ENV["SLACK_URL"] = "https://hooks.slack.com/services/#{ENV["SLACK_API_KEY"]}" # Ask for bump type ENV["BUMP_TYPE"] = prompt(text: "Bump type (major, minor, or patch): ") # Ensure gems are up-to-date bundle_install end def generate_release_notes(lane: lane) # Auto-generate release notes from git commits ENV["DESCRIPTION"] = changelog_from_git_commits( match_lightweight_tag: false, merge_commit_filtering: "exclude_merges", pretty: "* %s - %an (%h)", # Use the last known release of this platform > lane as a reference tag_match_pattern: "#{lane_context[SharedValues::PLATFORM_NAME]}-#{lane}-*" ) end # This block is called only if the executed lane was successful after_all do |lane| # Create a new git tag add_git_tag( tag: "#{lane_context[SharedValues::PLATFORM_NAME]}-#{lane}-v#{lane_context[SharedValues::VERSION_NUMBER]}" ) # Push the git tag to remote push_git_tags # Create a new release platform_name_display = if lane_context[SharedValues::PLATFORM_NAME] === :android then "Android" else "iOS" end name = "#{platform_name_display} #{lane} v#{lane_context[SharedValues::VERSION_NUMBER]} (Build ##{lane_context[SharedValues::BUILD_NUMBER]})" set_github_release( api_token: ENV["GITHUB_TOKEN"], description: ENV["DESCRIPTION"] || "", is_prerelease: if lane === :beta then true else false end, name: name, repository_name: "joncursi/redbird-native", tag_name: last_git_tag, upload_assets: if lane_context[SharedValues::PLATFORM_NAME] === :android then if lane === :beta then ["#{PATH_TO_ANDROID}/app/build/outputs/apk/app-staging.apk"] else ["#{PATH_TO_ANDROID}/app/build/outputs/apk/app-release.apk"] end else ["./fastlane/build/redbirdNative.ipa"] end ) # Send notification to Slack if ENV["SLACK_URL"] slack( message: "Successfully deployed a new #{lane_context[SharedValues::PLATFORM_NAME]} app update.", payload: { "Build Date" => Time.new.to_s } ) end end error do |lane, exception| # Send the error to Slack if ENV["SLACK_URL"] slack( message: exception.message, success: false, ) end end # IOS ---------------------------------------------------------------------------------------------- platform :ios do before_all do |lane| # Run the generic prebuild steps prebuild( lane: lane ) # Ensure that a standard version of XCode is used # verify_xcode ensure_xcode_version(version: "9.0.1") # Clean the project clear_derived_data # xcclean # Ensure that all pods are up-to-date # verify_pod_keys cocoapods( podfile: "#{PATH_TO_IOS}/Podfile" ) # Increment the version number in XCode increment_version_number( bump_type: ENV["BUMP_TYPE"], xcodeproj: PATH_TO_XCODE_PROJECT ) # Increment the build number in XCode increment_build_number({ build_number: latest_testflight_build_number + 1, xcodeproj: PATH_TO_XCODE_PROJECT }) # Commit the version bump commit_version_bump( message: "(chore) bump iOS app to v#{lane_context[SharedValues::VERSION_NUMBER]}", xcodeproj: PATH_TO_XCODE_PROJECT ) # Push the version bump push_to_git_remote # Ensure all certificates are up-to-date match( type: "appstore" ) # Generate release notes generate_release_notes( lane: lane ) end desc "Submit a new beta build to TestFlight" lane :beta do # Add a "beta" badges add_badge( dark: true, glob: "/ios/**/*.appiconset/*.{png,PNG}" ) # Build the app using the staging release scheme gym( scheme: "redbirdNative-staging" ) # Reset app icons to default sh 'git checkout -- ~/Sites/joncursi/redbird-native/ios/redbirdNative/Images.xcassets/AppIcon.appiconset/' # Upload to TestFlight pilot( beta_app_feedback_email: "support@cheddur.com" # distribute_external: true ) end desc "Deploy a new release to the App Store" lane :release do # Build the app using the production release scheme gym( scheme: "redbirdNative-production" ) # Update screenshots # snapshot # Frame screenshots # frameit( # path: "./fastlane/screenshots", # white: true # ) # Upload to the App Store deliver # Set the generic iOS changelog text set_changelog end end # ANDROID ------------------------------------------------------------------------------------------ platform :android do before_all do |lane| # Run the generic prebuild steps prebuild( lane: lane ) # Clean the Android project gradle( project_dir: PATH_TO_ANDROID, task: "clean" ) # Increment the version number in Gradle increment_android_version_number( path: PATH_TO_GRADLE_BUILD, type: ENV["BUMP_TYPE"] ) # Increment the build number in Gradle increment_android_build_number( path: PATH_TO_GRADLE_BUILD ) # Commit the version bump git_commit( path: File.dirname(PATH_TO_GRADLE_BUILD), message: "(chore) bump Android app to v#{lane_context[SharedValues::VERSION_NUMBER]}" ) # Create a new changelog changelog_file = "metadata/android/en-US/changelogs/#{lane_context[SharedValues::BUILD_NUMBER]}.txt" sh( "cat ./changelog.txt >> ./#{changelog_file}" ) # Commit the changelog changelog_path = File.dirname("./fastlane/#{changelog_file}") git_add( path: changelog_path ) git_commit( path: changelog_path, message: "(chore) add changelog for android-#{lane}-v#{lane_context[SharedValues::VERSION_NUMBER]} (build #{lane_context[SharedValues::BUILD_NUMBER]})" ) # Push the version bump and changelog push_to_git_remote # Generate release notes generate_release_notes( lane: lane ) end desc "Submit a new beta build to Google Play" lane :beta do # Add a "beta" badges add_badge( dark: true, glob: "/android/app/src/main/res/**/*.{png,PNG}" ) # Build the release APK gradle( build_type: "Staging", project_dir: PATH_TO_ANDROID, task: "assemble" ) # Reset app icons to default sh 'git checkout -- ~/Sites/joncursi/redbird-native/android/app/src/main/res' # Upload the APK to the Play Store supply( apk: "#{PATH_TO_ANDROID}/app/build/outputs/apk/app-staging.apk", metadata_path: "./fastlane/metadata/android", track: "beta" ) end desc "Deploy a new release to Google Play" lane :release do # Build the release APK gradle( build_type: "Release", project_dir: PATH_TO_ANDROID, task: "assemble" ) # Upload the APK to the Play Store supply( apk: "#{PATH_TO_ANDROID}/app/build/outputs/apk/app-release.apk", # check_superseded_tracks: true, --> doesn't work? metadata_path: "./fastlane/metadata/android", track: "beta", track_promote_to: "production" ) end end ````./fastlane/Appfile`
```ruby # README: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md ## Android ----------------------------------------------------------------------------------------- # Path to the JSON key file to authenticate our release bot with Google Play json_key_file "./fastlane/config/supply/google-play-api-secret.json" # The bundle identifier of the Android app package_name "com.cheddur" ## iOS --------------------------------------------------------------------------------------------- # The bundle identifier of the iOS app app_identifier "com.cheddur" # The Apple ID used to sign in to iTunes Connect apple_id "joncursi@gmail.com" # Team ID for project redbird team_id "4QTE5EZH9C" ```Loaded gems
| Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.1.0 | | executable-hooks | 1.3.2 | | bundler-unload | 1.0.2 | | rubygems-bundler | 1.4.4 | | bundler | 1.15.4 | | io-console | 0.4.6 | | CFPropertyList | 2.3.5 | | concurrent-ruby | 1.0.5 | | i18n | 0.9.0 | | minitest | 5.10.3 | | thread_safe | 0.3.6 | | tzinfo | 1.2.4 | | activesupport | 4.2.10 | | public_suffix | 2.0.5 | | addressable | 2.5.2 | | babosa | 1.0.2 | | curb | 0.9.4 | | fastimage | 2.1.0 | | colored | 1.2 | | highline | 1.7.8 | | commander-fastlane | 4.4.5 | | dotenv | 2.2.1 | | excon | 0.59.0 | | multipart-post | 2.0.0 | | faraday | 0.13.1 | | unf_ext | 0.0.7.4 | | unf | 0.1.4 | | domain_name | 0.5.20170404 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.12.2 | | gh_inspector | 1.0.3 | | jwt | 2.1.0 | | little-plugger | 1.1.4 | | multi_json | 1.12.2 | | logging | 2.2.2 | | memoist | 0.16.0 | | os | 0.9.6 | | signet | 0.8.1 | | googleauth | 0.6.1 | | httpclient | 2.8.3 | | mime-types-data | 3.2016.0521 | | mime-types | 3.1 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | uber | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.1 | | google-api-client | 0.13.6 | | json | 2.1.0 | | mini_magick | 4.5.1 | | multi_xml | 0.6.0 | | plist | 3.3.0 | | rubyzip | 1.2.1 | | security | 0.1.3 | | slack-notifier | 1.5.1 | | terminal-notifier | 1.8.0 | | unicode-display_width | 1.3.0 | | terminal-table | 1.8.0 | | tty-screen | 0.5.1 | | word_wrap | 1.0.0 | | claide | 1.0.2 | | colored2 | 3.1.2 | | nanaimo | 0.2.3 | | xcodeproj | 1.5.3 | | rouge | 2.0.7 | | xcpretty | 0.2.8 | | xcpretty-travis-formatter | 1.0.0 | | badge | 0.8.5 | | fuzzy_match | 2.0.4 | | nap | 1.1.0 | | cocoapods-core | 1.3.1 | | cocoapods-deintegrate | 1.0.1 | | cocoapods-downloader | 1.1.3 | | cocoapods-plugins | 1.0.0 | | cocoapods-search | 1.0.0 | | cocoapods-stats | 1.0.0 | | netrc | 0.11.0 | | cocoapods-trunk | 1.3.0 | | cocoapods-try | 1.1.0 | | escape | 0.0.4 | | fourflusher | 2.0.1 | | molinillo | 0.5.7 | | ruby-macho | 1.1.0 | | cocoapods | 1.3.1 | | fastlane-plugin-badge | 1.0.0 | | xcode-install | 2.3.1 |