fastlane: Fastlane Precheck fails with 'Failed: No broken urls-> unreachable URLs in app metadata'
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
I’m running precheck as always, and since two days ago started to fail with unreachable url, for support, marketing and privacy URL’s. The urls are ok, they don’t redirect and they are giving a 200 OK status.
Captured Output
Command Used: check_metadata
Output/Log
Successfully loaded Appfile at path '/Users/juannuvreni/Desktop/Development/Mascoteros/mascoteros-ios/Mascoteros/fastlane/Appfile'
- apple_id: 'apple@mascoteros.com'
- team_id: '2279G3HUYX'
-------
+--------------------------+----------------------+
| Summary for precheck 2.66.2 |
+--------------------------+----------------------+
| username | apple@mascoteros.com |
| default_rule_level | error |
| include_in_app_purchases | true |
+--------------------------+----------------------+
Looking for iTunes Connect Team with ID 118116013
+------+-------------------------------------+-------------+
| fastlane summary |
+------+-------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+-------------------------------------+-------------+
| 1 | Verifying required fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | cocoapods | 20 |
| 💥 | precheck | 5 |
+------+-------------------------------------+-------------+
✅ fastlane environment ✅
Stack
| Key | Value |
|---|---|
| OS | 10.13.1 |
| Ruby | 2.4.0 |
| Bundler? | false |
| Git | git version 2.13.6 (Apple Git-96) |
| Installation Source | ~/.rvm/gems/ruby-2.4.0/bin/fastlane |
| Host | Mac OS X 10.13.1 (17B48) |
| Ruby Lib Dir | ~/.rvm/rubies/ruby-2.4.0/lib |
| OpenSSL Version | OpenSSL 1.1.0e 16 Feb 2017 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 9.1 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | en_GB.UTF-8 | ✅ |
| LC_ALL | ||
| LANGUAGE |
fastlane files:
`./Fastfile`
# Customise this file, documentation can be found here:
# 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
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.54.1"
default_platform :ios
platform :ios do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." TO-DO: Set the hook with Slack
cocoapods
end
desc "Runs all the tests"
lane :test do
scan(scheme: "Pods-MascoterosTests",
clean: true,
device: "iPhone 6s (10.3)",
)
end
# You can define as many lanes as you want
############################################################################################################################################################################
desc "MASCOTEROS - BETA : Run the tests and then upload a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date"
lane :beta_release do
ENV["APP_IDENTIFIER"] = "com.mascoteros.MascoterosIOS.TestFlight"
match(type: "appstore")
increment_build_number
#commit_version_bump
gym(scheme: "Mascoteros-Staging")
pilot
end
############################################################################################################################################################################
desc "MASCOTEROS - RELEASE : Run the tests and then upload a new release Build to Apple Appstore"
desc "Deploy a new version to the App Store"
lane :release do
ENV["APP_IDENTIFIER"] = "com.mascoteros.MascoterosIOS"
match(type: "appstore")
#snapshot
#frameit
increment_build_number
#increment_version_number(bump_type: "minor")
gym(scheme: "Mascoteros-AppStore") # Build your app - more options available
deliver(precheck_default_rule_level: :error)
#deliver(force: true)
end
############################################################################################################################################################################
desc "MASCOTEROS - PRECHECK : Pre check before uploading to appstore"
lane :check_metadata do
precheck
end
after_all do |lane|
# This block is called, only if the executed lane was successful
# slack(
# message: "Successfully deployed new App Update."
# )
end
error do |lane, exception|
# slack(
# message: exception.message,
# success: false
# )
end
end
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions
# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
`./Appfile`
app_identifier ENV["APP_IDENTIFIER"] #"com.mascoteros.MascoterosIOS" # The bundle identifier of your app
apple_id "apple@mascoteros.com" # Your Apple email address
team_id "2279G3HUYX" # Developer Portal Team ID
# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.66.2 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.1.0 |
| slack-notifier | 1.5.1 |
| CFPropertyList | 2.3.5 |
| claide | 1.0.2 |
| colored2 | 3.1.2 |
| nanaimo | 0.2.3 |
| xcodeproj | 1.5.3 |
| rouge | 1.11.1 |
| xcpretty | 0.2.6 |
| terminal-notifier | 1.7.1 |
| unicode-display_width | 1.1.3 |
| terminal-table | 1.7.3 |
| plist | 3.2.0 |
| public_suffix | 2.0.5 |
| addressable | 2.5.1 |
| multipart-post | 2.0.0 |
| word_wrap | 1.0.0 |
| tty-screen | 0.6.2 |
| babosa | 1.0.2 |
| colored | 1.2 |
| highline | 1.7.8 |
| commander-fastlane | 4.4.5 |
| excon | 0.55.0 |
| faraday | 0.12.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 |
| fastimage | 2.1.0 |
| gh_inspector | 1.0.3 |
| json | 2.0.2 |
| mini_magick | 4.5.1 |
| multi_json | 1.12.1 |
| multi_xml | 0.6.0 |
| rubyzip | 1.2.1 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 0.0.4 |
| dotenv | 2.2.0 |
| bundler | 1.14.6 |
| faraday_middleware | 0.11.0.1 |
| uber | 0.0.15 |
| declarative | 0.0.9 |
| declarative-option | 0.1.0 |
| representable | 3.0.4 |
| retriable | 2.1.0 |
| mime-types-data | 3.2016.0521 |
| mime-types | 3.1 |
| little-plugger | 1.1.4 |
| logging | 2.2.2 |
| jwt | 1.5.6 |
| memoist | 0.15.0 |
| os | 0.9.6 |
| signet | 0.7.3 |
| googleauth | 0.5.1 |
| httpclient | 2.8.3 |
| google-api-client | 0.13.4 |
| io-console | 0.4.6 |
| openssl | 2.0.2 |
| bigdecimal | 1.3.0 |
| psych | 2.2.2 |
generated on: 2017-11-27
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 37 (17 by maintainers)
However, I don’t understand 2 things:
Q: Why did I have the issue with my isolated file where I had to replace
URIbyAddressable::URI? In my local Fastlane copy I didn’t have to change this. Or does Fastlane links somewhere else to the URI lib? A: When I addrequire "uri"to my test file it works. When I search the Fastlane repo, many classes use this. new Q: IsAddressable ::URIthe same asURI? If so, probably the solution is to removeAddressablefrom: https://github.com/fastlane/fastlane/blob/f2ea29347f894c00dc55e87a0e45c6063319d791/precheck/lib/precheck/rules/unreachable_urls_rule.rb#L27 Instead of addingrequire 'addressable'. I verified this in my local repo and it works too:INFO [2017-12-10 01:58:23.23]: ✅ Passed: No broken urlsQ: Why does precheck work for @milch (see his https://github.com/fastlane/fastlane/issues/11027#issuecomment-347486879) while it doesn’t for many users like me. Only after adding the link to ‘addressable’ it works. I searched the Fastlane repo for
require 'addressable'but it isn’t in. Are there multiple configurations around?In summary, there are 2 solutions:
require 'addressable'orAddressable::URIbyURII was able to get the script running by:
URIin the request line byAddressable::URI. Now an error on the next line was given about uninitialized constant FaradayMiddlewarerequire "faraday_middleware". This was a mistake of my isolated test file.So only change 1 seems the solution.
I added the print line to show the result.
The final code:
The result:
And ran again for the particular URL of this issue:
I have the same issue where my valid URLs are reported erroneous. The error “URL https://www.mascoteros.com not reachable 😵” is given in https://github.com/fastlane/fastlane/blob/f2ea29347f894c00dc55e87a0e45c6063319d791/precheck/lib/precheck/rules/unreachable_urls_rule.rb#L35 as part of the
rescueaction. Doesn’t this mean that thebegincode is failing?When I isolate the begin code in a small test Ruby file and run it in Terminal, it fails on the request line with:
Here is the file content of testURLCheck.rb:
@sheinix Also, please run the following command from the command line in your project directory:
Make sure the path after
catpoints to one of the files with a URL that is failing. It should copy the output to the clipboard. Please paste the result here, exactly as it was copied