Skip to content

Conversation

crazymanish
Copy link
Member

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Resolves #19124

Description

  • It seems Apple suddenly removed the v1 endpoint!

Testing Steps

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "crazymanish-spaceship-client-fix"
  • Try to download_dsyms or latest_testflight_build_number

@hliejun
Copy link

hliejun commented Jul 22, 2021

To add on, calling curl on the respective versioned API endpoints give the following results
image

@pvroosendaal
Copy link

Still having the same issue after updating fastlane. How can I be sure this fastlane's version is correctly installed on my machine?

@crazymanish
Copy link
Member Author

Still having the same issue after updating fastlane. How can I be sure this fastlane's version is correctly installed on my machine?

Testing Steps

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "crazymanish-spaceship-client-fix"

After the above step, you should look into Gemfile.lock that should point to 👆
For example, see the screenshot
Screenshot 2021-07-22 at 14 32 42

@pvroosendaal
Copy link

Ah yeah, of course.. Thanks. It's not pointing to the branch, so I'm doing something wrong atm. Keep you posted.

@tovkal
Copy link

tovkal commented Jul 22, 2021

download_dsyms works again for me with this, thanks!

@harveyconnor
Copy link

this is working!

@crazymanish crazymanish requested a review from ainame July 22, 2021 12:51
@absimas
Copy link

absimas commented Jul 22, 2021

I'm getting timeouts:

Timeout received! Retrying after 3 seconds (remaining: 5)...
Timeout received! Retrying after 3 seconds (remaining: 4)...
Timeout received! Retrying after 3 seconds (remaining: 3)...
Timeout received! Retrying after 3 seconds (remaining: 2)...
Timeout received! Retrying after 3 seconds (remaining: 1)...

The request could not be completed because: (Spaceship::InternalServerError)
Server error got 500

Without this fix getting the previous

The request could not be completed because: (Spaceship::Tunes::Error)
Not Found

@viktor-savchik-idf
Copy link

@crazymanish Thx a lot, this is working!

@amandineeap
Copy link

Hi @crazymanish
I've been following the thread since this morning as mine was working fine yesterday but had the same issue this morning...

My Gemfile.lock has updated correctly to your branch but I am still seeing errors... any suggestions as to what else might be going on?
Screenshot 2021-07-22 at 15 07 54

@viktor-savchik-idf
Copy link

Hi @crazymanish
I've been following the thread since this morning as mine was working fine yesterday but had the same issue this morning...

My Gemfile.lock has updated correctly to your branch but I am still seeing errors... any suggestions as to what else might be going on?
Screenshot 2021-07-22 at 15 07 54

I'm guessing that you are using fastlane without bundle exec, use like:
bundle exec fastlane lane_name

@amandineeap
Copy link

amandineeap commented Jul 22, 2021

I'm guessing that you are using fastlane without bundle exec, use like:
bundle exec fastlane lane_name

Yeah I was running the top level scripts rather than the ones inside the App folder... 🙃
That worked - thanks very much for the help @viktor-savchik-idf

@elvis-zunde
Copy link

@crazymanish , thanks a lot man, worked!

@kozak
Copy link

kozak commented Jul 22, 2021

Thanks for this!
We get an error when trying to perform IOS snapshots:

DEBUG [2021-07-22 14:43:16.09]: Checking that helper files contain SnapshotHelperVersion [1.27]
ERROR [2021-07-22 14:43:16.28]: Your './vendor/bundle/ruby/2.7.0/bundler/gems/fastlane-7b45f3c8958f/snapshot/example/fastlane/SnapshotHelper.swift' is outdated, please run `fastlane snapshot update`
ERROR [2021-07-22 14:43:16.28]: to update your Helper file
WARN [2021-07-22 14:43:16.28]: Lane Context: ...
ERROR [2021-07-22 14:43:16.28]: Please update your Snapshot Helper file using `fastlane snapshot update`

Not sure why it is checking it in the example folder, probably unrelated to this patch.

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 🔥 Thank you for making this change so quickly! Really appreciate you saving the day 😊

@joshdholtz joshdholtz merged commit 98a544e into master Jul 22, 2021
@joshdholtz joshdholtz deleted the crazymanish-spaceship-client-fix branch July 22, 2021 16:04
@joshdholtz joshdholtz restored the crazymanish-spaceship-client-fix branch July 22, 2021 16:04
@addbrick
Copy link
Contributor

@crazymanish I am getting 404 still when doing the simple test of selecting a team. The response body says There is no route for the path 'v2/session/webSession'. See full response below. I belong to over 130 teams

Script

require 'spaceship'

Spaceship::Tunes.login 'XXX@XXX.com'
ENV['FASTLANE_ITC_TEAM_ID'] = 'XXXX'
Spaceship::Tunes.select_team

This will fail silently and not actually select a team.

Debugging the webSessions response from team_id=

=> #<Faraday::Response:0x00007fd86c1500a8
 @env=
  #<struct Faraday::Env
   method=:post,
   request_body="{\"contentProviderId\":\"XXXXXX\",\"dsId\":\"XXXXXXXX\"}",
   url=#<URI::HTTPS https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/v2/session/webSession>,
   request=#<struct Faraday::RequestOptions params_encoder=nil, proxy=nil, bind=nil, timeout=300, open_timeout=300, read_timeout=nil, write_timeout=nil, boundary=nil, oauth=nil, context=nil, on_data=nil>,
   request_headers=
    {"User-Agent"=>"Spaceship 2.187.0",
     "Content-Type"=>"application/json",
     "Cookie"=>
      "XXXXXXXXXXX"},
   ssl=
    #<struct Faraday::SSLOptions
     verify=true,
     ca_file=nil,
     ca_path=nil,
     verify_mode=nil,
     cert_store=nil,
     client_cert=nil,
     client_key=nil,
     certificate=nil,
     private_key=nil,
     verify_depth=nil,
     version=nil,
     min_version=nil,
     max_version=nil>,
   parallel_manager=nil,
   params=nil,
   response=#<Faraday::Response:0x00007fd86c1500a8 ...>,
   response_headers=
    {"server"=>"daiquiri/3.0.0",
     "x-apple-jingle-correlation-key"=>"ZERET4Y2223YFL5GVL2KYE6KXI",
     "x-apple-request-uuid"=>"c92249f3-1ad6-b782-afa6-aaf4ac13caba",
     "apple-tk"=>"false",
     "x-b3-spanid"=>"0d37d00634ba35e1",
     "b3"=>"c92249f31ad6b782afa6aaf4ac13caba-0d37d00634ba35e1",
     "cache-control"=>"private, no-cache, must-revalidate, max-age=0, no-store",
     "x-b3-traceid"=>"c92249f31ad6b782afa6aaf4ac13caba",
     "x-webobjects-loadaverage"=>"111",
     "x-responding-instance"=>"MZLabel:5958:::",
     "apple-seq"=>"0.0",
     "apple-originating-system"=>"MZLabel",
     "strict-transport-security"=>"max-age=31536000; includeSubDomains; preload",
     "x-frame-options"=>"SAMEORIGIN",
     "x-apple-application-site"=>"MR22",
     "apple-timing-app"=>"8 ms",
     "expires"=>"Thu, 01-Jan-1970 00:00:00 GMT",
     "x-apple-application-instance"=>"5958",
     "pragma"=>"no-cache",
     "x-daiquiri-instance"=>"daiquiri:13851001:mr22p00it-ztbu06091501:7987:21HOTFIX14, daiquiri:13851001:mr22p00it-ztbu06091501:7987:21HOTFIX14, daiquiri:38493001:pv50p00it-hyhk12043901:7987:21HOTFIX14",
     "x-xss-protection"=>"1; mode=block",
     "x-content-type-options"=>"nosniff",
     "x-content-security-policy"=>"script-src 'self' *.apple.com",
     "vary"=>"Accept-Encoding",
     "date"=>"Thu, 22 Jul 2021 15:50:47 GMT",
     "content-length"=>"112",
     "connection"=>"close",
     "set-cookie"=>
      "XXXXXXXXXX; Max-Age=1800; Expires=Thu, 22 Jul 2021 16:20:47 GMT; Path=/; Secure; HTTPOnly"},
   status=404,
   reason_phrase="Not Found",
   response_body="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<String>There is no route for the path 'v2/session/webSession'.</String>\n">,
 @on_complete_callbacks=[]>

@joshdholtz
Copy link
Member

@addbrick Ahhhh, I'm able to replicate this too! I will create a new PR that fixes this

@fastlane-bot
Copy link

Hey @crazymanish 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane fastlane locked and limited conversation to collaborators Sep 22, 2021
@lacostej lacostej deleted the crazymanish-spaceship-client-fix branch November 24, 2023 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[spaceship] Not Found error on all actions/spaceship depending on ITC login to set team id due to change on Apple