Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaceship::Tunes::SandboxTester.create -> {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Not Found"], "info"=>nil}, "statusCode"=>"ERROR"} #16739

Closed
4 tasks done
polok opened this issue Jul 3, 2020 · 12 comments · Fixed by #16742

Comments

@polok
Copy link

polok commented Jul 3, 2020

New Release Candidate Issue Checklist

Issue Description

I can't create sandbox user using Spaceship::Tunes::SandboxTester.create. I am getting following error:
{"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Not Found"], "info"=>nil}, "statusCode"=>"ERROR"}

Complete output when running fastlane, including the stack trace and command used
bundler: failed to load command: fastlane (.rbenv/versions/2.4.2/bin/fastlane)
Spaceship::UnexpectedResponse: [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Not Found"], "info"=>nil}, "statusCode"=>"ERROR"}
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/spaceship/lib/spaceship/client.rb:717:in `parse_response'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/spaceship/lib/spaceship/tunes/tunes_client.rb:1469:in `create_sandbox_tester!'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/spaceship/lib/spaceship/tunes/sandbox_tester.rb:46:in `create!'
  ITC:30:in `block in parsing_binding'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  .rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/fastlane-2.150.1/bin/fastlane:23:in `'
  .rbenv/versions/2.4.2/bin/fastlane:23:in `load'
  .rbenv/versions/2.4.2/bin/fastlane:23:in `'

Spaceship Logs

Spaceship::UnexpectedResponse: [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Not Found"], "info"=>nil}, "statusCode"=>"ERROR"}

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.15.5
Ruby 2.4.2
Bundler? false
Git git version 2.24.3 (Apple Git-128)
Installation Source ~/.rbenv/versions/2.4.2/bin/fastlane
Host Mac OS X 10.15.5 (19F101)
Ruby Lib Dir ~/.rbenv/versions/2.4.2/lib
OpenSSL Version OpenSSL 1.1.0j 20 Nov 2018
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode-11.5.app/Contents/Developer/
Xcode Version 11.5

System Locale

Error
No Locale with UTF8 found 🚫

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
slack-notifier 2.3.2
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
plist 3.5.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-cursor 0.7.1
tty-spinner 0.9.3
babosa 1.0.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.7
gh_inspector 1.1.3
mini_magick 4.10.1
multi_xml 0.6.0
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.7.5
bundler 2.1.2
naturally 2.2.0
simctl 1.6.8
jwt 2.1.0
uber 0.1.0
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
multi_json 1.14.1
signet 0.14.0
httpclient 2.8.3
google-api-client 0.38.0
nanaimo 0.2.6
colored2 3.1.2
claide 1.0.3
CFPropertyList 3.0.2
atomos 0.1.3
xcodeproj 1.17.0
public_suffix 3.1.1
addressable 2.7.0
tty-screen 0.8.0
excon 0.75.0
faraday 1.0.1
unf_ext 0.0.7.7
faraday_middleware 1.0.0
json 2.3.1
declarative 0.0.20
os 1.1.0
memoist 0.16.2
googleauth 0.13.0
digest-crc 0.6.0
google-cloud-errors 1.0.1
google-cloud-env 1.3.2
google-cloud-core 1.5.0
google-cloud-storage 1.26.2
emoji_regex 3.0.0
aws-eventstream 1.1.0
aws-sigv4 1.2.1
aws-partitions 1.338.0
jmespath 1.4.0
aws-sdk-core 3.103.0
aws-sdk-kms 1.36.0
aws-sdk-s3 1.73.0
openssl 2.0.5
io-console 0.4.6
mini_portile2 2.4.0
nokogiri 1.10.9
psych 2.2.2

generated on: 2020-07-03

Mentioning

cc: @joshdholtz

@joshdholtz
Copy link
Member

@polok Hey! A lot of stuff in Spaceship::Tunes needs to get migrated to Spaceship::ConnectAPI and looks like I forgot that one ☹️ I will see if I can get that out today for you

@joshdholtz
Copy link
Member

@polok PR here for you 👉 #16742

I will get this released later today

@fastlane-bot
Copy link

The pull request #16742 that closed this issue was merged and released as part of fastlane 2.150.2 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

@polok
Copy link
Author

polok commented Jul 6, 2020

@joshdholtz Wow, so fast :D Thank you!

@ravichandra-ayla
Copy link

ravichandra-ayla commented Sep 3, 2020

I am still getting this issue.

🔗  You can ⌘ + double-click on links to open them directly in your browser.
Traceback (most recent call last):
	25: from /usr/local/bin/fastlane:23:in `<main>'
	24: from /usr/local/bin/fastlane:23:in `load'
	23: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/bin/fastlane:23:in `<top (required)>'
	22: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
	21: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
	20: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:352:in `run'
	19: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
	18: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
	17: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
	16: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
	15: from /Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	14: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
	13: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	12: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	11: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
	10: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	 9: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	 8: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/fastlane/lib/fastlane/lane.rb:33:in `call'
	 7: from app_store_core.rb:230:in `block (2 levels) in parsing_binding'
	 6: from app_store_core.rb:70:in `version_valid_for_build'
	 5: from app_store_core.rb:31:in `get_live_version_number'
	 4: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/spaceship/lib/spaceship/tunes/application.rb:131:in `edit_version'
	 3: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/spaceship/lib/spaceship/tunes/app_version.rb:291:in `find'
	 2: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/spaceship/lib/spaceship/tunes/tunes_client.rb:447:in `app_version'
	 1: from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/spaceship/lib/spaceship/tunes/tunes_client.rb:456:in `app_version_data'
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/spaceship/lib/spaceship/client.rb:718:in `parse_response': [!] {"data"=>nil, "messages"=>{"warn"=>nil, "error"=>["Not Found"], "info"=>nil}, "statusCode"=>"ERROR"} (Spaceship::UnexpectedResponse)
rkr@MacBook-Pro iOS_Test % 
rkr@MacBook-Pro iOS_Test % 
rkr@MacBook-Pro iOS_Test % 
rkr@MacBook-Pro iOS_Test % fastlane -v
fastlane installation at path:
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.157.2/bin/fastlane
-----------------------------
[✔] 🚀 
fastlane 2.157.2
rkr@MacBook-Pro iOS_Test %

@joshdholtz
Copy link
Member

@ravichandra-ayla It looks like you are still using stuff in Spaceship::Tunes 🤔 You need to use the things in Spaceship::ConnectAPI. There are examples in this PR - #16742

@ravichandra-ayla
Copy link

@joshdholtz I saw the examples in the given PR and is still using below API's.

Spaceship::Tunes.login(email)
Spaceship::Tunes.select_team(team_name: team_name)

I am also using those API for login. Let me know how to use connectAPI for login and I will try to modify. Thanks.

@joshdholtz
Copy link
Member

@ravichandra-ayla Can you try this? 👇

Spaceship::ConnectAPI.login(email, team_name: team_name

But can you also send me what your Fastfile looks like too? That might help me get a better understanding of what’s going on!

@ravichandra-ayla
Copy link

@joshdholtz I tried Spaceship::ConnectAPI.login for login and it's working fine as expected, along with I was also using Spaceship for getting current App Store version string unfortunately I suppose to get it in app.edit_version, where now with new API it's broken.

sample code
app = Spaceship::ConnectAPI::App.find(bundle_id) puts "app = #{app}" puts "app.bundle_id = #{app.bundle_id}" puts "app.name = #{app.name}" version = app.edit_version

Response:-
[15:30:24]: app = #Spaceship::ConnectAPI::App:0x00007f99f18c1bc0
[15:30:24]: app.bundle_id = com.companyname.xyz
[15:30:24]: app.name = X Y Z
[!] undefined method `edit_version' for #Spaceship::ConnectAPI::App:0x00007f99f18c1bc0 (NoMethodError)

where as I thought method name has been changed, so double configured with fastlane-master/spaceship/docs/AppStoreConnect.md README file that method name is same as mentioned in updated doc

Line #97 from the AppStoreConnect.md README file.
app.live_version # the version that's currently available in the App Store
app.edit_version # the version that's in Prepare for Submission mode

It would be great if I can get right API to get edit_version string.

Thanks.

@ravichandra-ayla
Copy link

@joshdholtz any update on this? Our build process is struck now. Would be great if you can help to resolve this issue.

@andrewclaus
Copy link

I use the edit_version to release what I have pending for developer for release, and I found this here that might work for me:

def get_pending_release_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)

There is also another method above that something that seems like the edit_version:

def get_edit_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)

Have not tried yet to see if it works

@ravichandra-ayla
Copy link

@andrewclaus great thanks. I got an API where I can get edit version string. Thanks.

latest_app_version = app.get_app_store_versions.first.version_string

Anyway connect API uses get_app_store_versions API inside get edit version API so I am directly using it to get version string.

@fastlane fastlane locked and limited conversation to collaborators Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants