fastlane: upload_to_testflight:

Not Found

New Issue Checklist

Issue Description

Complete output when running fastlane, including the stack trace and command used
  +--------------------------------+--------------------------------------+
[20:09:29]: <!DOCTYPE html><html lang="en">
<head>
<title></title>
<link rel="stylesheet" href="/styles/main.css">
<style type='text/css'>
    /*include ../../dist/styles/main.css*/
</style>
</head>

<body><div id="wrapper" class="j42">
<h2>Not Found</h2></div>

<div class="footer">
    <p>Copyright &copy; <span id='year'>2015</span> Apple Inc. All rights reserved.</p>
    <ul><li><a href="https://www.apple.com/legal/internet-services/itunes/">Terms of Service</a></li><li><a href="https://www.apple.com/legal/privacy">Privacy Policy</a></li></ul>
</div>


<script type='text/javascript'>(function() {
    var isIos = navigator.userAgent.match(/(iPod|iPhone|iPad)/);
    document.body.setAttribute( 'class', (!isIos) ? 'otherBrowser' : 'isMobileSafari' )
    var yearEl = document.getElementById('year');
    if (yearEl) { yearEl.textContent = new Date().getFullYear(); }
})();
</script>

</body>
</html>

+------+------------------------+-------------+
|              fastlane summary               |
+------+------------------------+-------------+
| Step | Action                 | Time (in s) |
+------+------------------------+-------------+
| 1    | default_platform       | 0           |
| 2    | latest_testflight_bui  | 13          |
|      | ld_number              |             |
| 3    | increment_build_numbe  | 1           |
|      | r                      |             |
| 4    | build_app              | 792         |
| 💥   | upload_to_testflight   | 3664        |
+------+------------------------+-------------+

[20:09:29]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

/Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/spaceship/lib/spaceship/test_flight/client.rb:330:in `handle_response': [!] <!DOCTYPE html><html lang="en"> (Spaceship::UnexpectedResponse)
<head>
<title></title>
<link rel="stylesheet" href="/styles/main.css">
<style type='text/css'>
    /*include ../../dist/styles/main.css*/
</style>
</head>

<body><div id="wrapper" class="j42">
<h2>Not Found</h2></div>

<div class="footer">
    <p>Copyright &copy; <span id='year'>2015</span> Apple Inc. All rights reserved.</p>
    <ul><li><a href="https://www.apple.com/legal/internet-services/itunes/">Terms of Service</a></li><li><a href="https://www.apple.com/legal/privacy">Privacy Policy</a></li></ul>
</div>


<script type='text/javascript'>(function() {
    var isIos = navigator.userAgent.match(/(iPod|iPhone|iPad)/);
    document.body.setAttribute( 'class', (!isIos) ? 'otherBrowser' : 'isMobileSafari' )
    var yearEl = document.getElementById('year');
    if (yearEl) { yearEl.textContent = new Date().getFullYear(); }
})();
</script>

</body>
</html>
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/spaceship/lib/spaceship/test_flight/client.rb:72:in `post_for_testflight_review'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/spaceship/lib/spaceship/test_flight/build.rb:217:in `submit_for_testflight_review!'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/pilot/lib/pilot/build_manager.rb:183:in `distribute_build'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/pilot/lib/pilot/build_manager.rb:108:in `distribute'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/pilot/lib/pilot/build_manager.rb:61:in `upload'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/actions/upload_to_testflight.rb:16:in `run'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:232:in `block in execute_action'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
	from Fastfile:38:in `block (2 levels) in parsing_binding'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
	from /Users/daminik00/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.110.0/bin/fastlane:23:in `<top (required)>'
	from /Users/daminik00/.fastlane/bin/bundle/bin/fastlane:22:in `load'
	from /Users/daminik00/.fastlane/bin/bundle/bin/fastlane:22:in `<main>'

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 10.14.3
Ruby 2.2.4
Bundler? false
Git git version 2.17.1 (Apple Git-112)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.14.3 (18D21c)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 10.0

System Locale

Variable Value
LANG en_US.UTF-8 ✅
LC_ALL en_US.UTF-8 ✅
LANGUAGE en_US.UTF-8 ✅

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
  ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = «"
  desc "Push a new beta build to TestFlight"

  lane :sendPush do
    changelog = File.read("Changelog.txt")
    url = URI.parse(URI.escape("http://api.daminik00.ru/push.php?info=#{changelog}"))
    req = Net::HTTP::Get.new(url.to_s)
    res = Net::HTTP.start(url.host, url.port) {|http|
      http.request(req)
    }
  end

  lane :beta do
    increment_build_number(
      build_number: latest_testflight_build_number.to_i + 1,
      xcodeproj: "SupremeBotiOSAcute.xcodeproj"
    )
    build_app(workspace: "SupremeBotiOSAcute.xcworkspace", scheme: "SupremeBotiOSAcute")
    changelog = File.read("Changelog.txt")
    upload_to_testflight(changelog: changelog, beta_app_description: "Удачных вам дропов", groups: "Me")
    sendPush
  end
end

`./fastlane/Appfile`
app_identifier("ru.daminik00.Supreme-Bot") # The bundle identifier of your app
apple_id("dev.daminik00@gmail.com") # Your Apple email address

itc_team_id("118705364") # App Store Connect Team ID
team_id("4X4HAH2D2G") # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.110.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 2.3.2
atomos 0.1.3
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.7.0
rouge 2.0.7
xcpretty 0.3.0
unicode-display_width 1.1.3
terminal-table 1.7.3
multipart-post 2.0.0
word_wrap 1.0.0
public_suffix 2.0.5
tty-screen 0.6.5
tty-cursor 0.6.0
tty-spinner 0.9.0
babosa 1.0.2
colored 1.2
commander-fastlane 4.4.6
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
gh_inspector 1.1.3
json 1.8.1
mini_magick 4.5.1
multi_xml 0.6.0
rubyzip 1.2.2
security 0.1.3
xcpretty-travis-formatter 0.0.4
bundler 1.14.6
faraday_middleware 0.11.0.1
naturally 2.2.0
simctl 1.6.5
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
mime-types 3.1
signet 0.11.0
memoist 0.16.0
googleauth 0.6.7
httpclient 2.8.3
google-api-client 0.23.9
google-cloud-env 1.0.5
google-cloud-core 1.2.7
digest-crc 0.4.1
google-cloud-storage 1.15.0
emoji_regex 0.1.1
highline 1.7.10
excon 0.62.0
CFPropertyList 3.0.0
libxml-ruby 3.0.0
plist 3.4.0
fastimage 2.1.5
addressable 2.5.2
retriable 3.1.2
mime-types-data 3.2018.0812
multi_json 1.13.1
jwt 2.1.0
os 1.0.0
psych 2.0.8
uber 0.1.0

generated on: 2018-12-13

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 38 (12 by maintainers)

Most upvoted comments

I got the same problem.

Hello everyone! I want to give an update. I was able to make some code changes and I got a submit working on my local machine again 😊 Bad news is we had to implement some of App Store Connect’s new APIs so it will be a bit longer until I can properly put all the pieces together so that we can ship this fix but I was able to put the pieces back together.

Stay tuned 💪

The problem is reproduced for all our applications. upload_to_testflight is completely broken.

Heyyyy 👋 I’m here working on trying to replicate this issue so I can solve for you all 😊

Release will be happening later today! Sorry to keep everyone waiting 😬 Testing out one more PR that fixes some adhoc profile stuff and then these will both be shipped out 🚀

Heyyyy 👋 I think I got a fix working in PR #13919 if anybody would like to give this a shot 😊

How To

Replace gem "fastlane" in your Gemfile with the following and run bundle install`

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz-post_for_testflight_review-new-api"

This uses the new App Store Connect API (the first use of it in fastlane) so having some other people testing this would be 💯

Yep, those are perfect. Will look into those. Thanks!

We updated fastlane version to 2.111.0 and now we are not getting ‘Not found’ error but another error, same as what @nickgsc pointed out. Will this also be fixed in latest release?

/Users/ios-worker/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fastlane-c63166f9d98c/spaceship/lib/spaceship/connect_api/client.rb:84:in handle_response': [!] The build is not in state for internal testing. - Build is not in internal testing state. (Spaceship::UnexpectedResponse) from /Users/ios-worker/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/fastlane-c63166f9d98c/spaceship/lib/spaceship/connect_api/client.rb:66:in post_for_testflight_review’ from /Users/ios-worker/.r

@joshdholtz thanks for rolling such a quick fix for this. We tested out the branch and it allowed us to get past the waiting for review and get a build out into App Store Connect. Still got a failure related to an UnexpectedResponse, but it got far enough along to unblock us for now. This failure was on CircleCI:

bundler: failed to load command: fastlane (/Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bin/fastlane)
Spaceship::UnexpectedResponse: [!] The build is not in state for internal testing. - Build is not in internal testing state.
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/spaceship/lib/spaceship/api/client.rb:84:in `handle_response'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/spaceship/lib/spaceship/api/client.rb:66:in `post_for_testflight_review'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/spaceship/lib/spaceship/test_flight/build.rb:223:in `submit_for_testflight_review!'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/pilot/lib/pilot/build_manager.rb:183:in `distribute_build'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/pilot/lib/pilot/build_manager.rb:108:in `distribute'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/pilot/lib/pilot/build_manager.rb:61:in `upload'
  /Users/distiller/gospotcheck-ios/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-a469c588e701/fastlane/lib/fastlane/actions/upload_to_testflight.rb:16:in `run'

FYI, I already had ITSAppUsesNonExemptEncryption key

<key>ITSAppUsesNonExemptEncryption</key>
<false/>

Success! thanks abunch guys.

@janpio what is the timeline for getting this release out? If there is anyway to get something pushed out today, that would be a major help!

Update on my comment from last weekend. Today, one of our developers inadvertently reverted us back to the latest mainline fastlane version (2.111.0) and pushed a new build which failed. But what is weird is that we did not see the <h2>Not Found</h2> error from last week and the build did get uploaded successfully. Instead, we did get a slightly different error further down the build, trying to set the changelog, of all things:

[!] Could not set changelog: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 403 </title>
</head>
<body>
<h2>HTTP ERROR: 403</h2>

The fact that we are not getting the original error seems to suggest that Apple might have un-deprecated the old iTunes connect endpoint? This changelog error appears to be something entirely new that we weren’t seeing last week. I’ll open a separate issue about that.

edit: the changelog 403 is probably a red herring, due to us changing the perms on the app connect user that CI runs with. But my previous point about the original <h2>Not Found</h2> error going away still remains valid

@joshdholtz The Could not find a build for app has happened to me before. It happened randomly so I guess Apple’s at fault. Anyway, have a nice trip

Thanks guys 💪