fastlane: Spaceship::TunesClient::ITunesConnectError: invalid request body

New Issue Checklist

Issue Description

Receiving Spaceship::TunesClient::ITunesConnectError: invalid request body when calling Spaceship::Tunes.select_team. The request to set the team id on line 88 is returning HTTP 400. Here is the response body:

{
  "data"=>nil,
  "messages"=>{"warn"=>nil, "error"=>["invalid request body"], "info"=>nil}, 
  "statusCode"=>"ERROR"
}

I did some digging with switching teams in ITC and it looks like Spaceship needs the dsId param in the ra/v1/session/webSession. Once I added this param to the request, I received a 200 and everything worked as expected.

response = request(:post) do |req|
  req.url "ra/v1/session/webSession"
  req.body = { contentProviderId: team_id, dsId: 'mydsid' }.to_json
  req.headers['Content-Type'] = 'application/json'
end

Note: by the time i got this posted there was a duplicate: #6710 . sorry about that

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hey everyone, thanks for the reports, I can reproduce the issue, I’m working on a fix πŸš€

Hey, thanks for your patience everyone, we were able to push new releases for spaceship, pilot and deliver, please update to the latest release using [sudo] gem update deliver or [sudo] gem update pilot. If you’re using bundler use bundle update instead πŸ‘

Special thanks to @summera for providing a super fast fix, and @milch for reviewing all the required version bumps and dependency updates πŸš€

Please let us know if that solves the issue for you.

@KrauseFx thanks for the fast fixes! works perfectly for me πŸ˜ƒ