sshaw / itunes_store_transporter

Upload and manage your assets in the iTunes Store using the iTunes Store’s Transporter (iTMSTransporter).
http://transportergui.com
119 stars 14 forks source link

providers command is not working #17

Closed murtyk closed 6 years ago

murtyk commented 6 years ago

When I run the provider command directly using itunes transporter, it works and lists the providers. Using gem's itms.provders is giving error

$ /usr/local/itms/bin/iTMSTransporter -u myuser -p mypassword -m provider
[2018-09-24 14:18:26 EDT] <main>  INFO: Transporter is searching for new software components.
[2018-09-24 14:18:27 EDT] <main>  INFO: Update check complete.
[2018-09-24 14:18:28 EDT] <main>  INFO: Logging configured successfully.
[2018-09-24 14:18:29 EDT] <main> DEBUG: Attempting refresh of configuration data from https://contentdelivery.itunes.apple.com/transporter/Defaults.properties
[2018-09-24 14:18:29 EDT] <main> DEBUG: Configuration refresh successful.
[2018-09-24 14:18:29 EDT] <main> DEBUG: Saving configuration to local path: /Users/murty/.itmstransporter/Defaults.properties
[2018-09-24 14:18:29 EDT] <main>  INFO: iTMSTransporter : iTunes Store Transporter [1.12.0]
[2018-09-24 14:18:29 EDT] <main>  INFO: OS identifier: Mac OS X 10.12.6 (x86_64); jvm=25.71-b01; jre=1.8.0-u131-b11-iTMSTransporter-b01
[2018-09-24 14:18:29 EDT] <main>  INFO: Memory: [JVM] 1033M free, 1076M total, 1820M max [System] (Physical) 226M free, 16384M total (Swap) 1503M free, 5120M total
[2018-09-24 14:18:29 EDT] <main>  INFO: Provider mode selected.
[2018-09-24 14:18:29 EDT] <main>  INFO: Performing providers request ...
[2018-09-24 14:18:29 EDT] <main> DBG-X: Memory: [JVM] 1033M free, 1076M total, 1820M max [System] (Physical) 226M free, 16384M total (Swap) 1503M free, 5120M total
[2018-09-24 14:18:29 EDT] <main> DBG-X: Memory: [JVM] 1033M free, 1076M total, 1820M max [System] (Physical) 226M free, 16384M total (Swap) 1503M free, 5120M total
[2018-09-24 14:18:29 EDT] <main> DBG-X: Using operation named: authenticateForSession
[2018-09-24 14:18:29 EDT] <main> DBG-X: Apple's web service operation input parameters:
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter Application = iTMSTransporter
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter BaseVersion = 1.10.0
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter OSIdentifier = Mac OS X 10.12.6 (x86_64); jvm=25.71-b01; jre=1.8.0-u131-b11-iTMSTransporter-b01
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter StatisticsClientStartDateTimeZoneISO = 2018-09-24T14:18:29-04:00
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter StatisticsPreviousCallDurationInSecs = 0.227667722
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter TransporterArguments = -u myuser -p **hidden value** -m provider
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter Version = 1.12.0
[2018-09-24 14:18:29 EDT] <main> DBG-X:   parameter iTMSTransporterMode = provider
[2018-09-24 14:18:29 EDT] <main>  INFO: id = 20180924141829-676
[2018-09-24 14:18:29 EDT] <main>  INFO: iTMSTransporter Correlation Key: 6ca3ef07-aaad-4070-832d-1099eb9a18ec
[2018-09-24 14:19:33 EDT] <main> DBG-X: Apple's web service operation return value:
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter SharedSecret = **hidden value**
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter MultipartUploadsEnabled = true
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter EnableJWTForAllCalls = false
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter TxHeaders = {jenga=false}
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter SessionExpiration = 2018-09-28T18:19:33.413Z
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter SessionId = CNGoDBIQGywntJacQRyAf3wv9rXiFg==
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter StreamingSettings = {LogStreamingEnabled=true, MultipartUploadsEnabled=true, AssetDescriptionStreamingEnabled=false}
[2018-09-24 14:19:33 EDT] <main> DBG-X: Using operation named: providersWithArguments
[2018-09-24 14:19:33 EDT] <main> DBG-X: Apple's web service operation input parameters:
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter Application = iTMSTransporter
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter BaseVersion = 1.10.0
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter OSIdentifier = Mac OS X 10.12.6 (x86_64); jvm=25.71-b01; jre=1.8.0-u131-b11-iTMSTransporter-b01
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter StatisticsClientStartDateTimeZoneISO = 2018-09-24T14:19:33-04:00
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter TransporterArguments = -u myuser -p **hidden value** -m provider
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter Version = 1.12.0
[2018-09-24 14:19:33 EDT] <main> DBG-X:   parameter iTMSTransporterMode = provider
[2018-09-24 14:19:33 EDT] <main>  INFO: id = 20180924141933-753
[2018-09-24 14:19:33 EDT] <main>  INFO: iTMSTransporter Correlation Key: 6ca3ef07-aaad-4070-832d-1099eb9a18ec
[2018-09-24 14:19:34 EDT] <main> DBG-X: Apple's web service operation return value:
[2018-09-24 14:19:34 EDT] <main> DBG-X:   parameter Vydia = vydia

Provider listing:
   - Long Name -  - Short Name -
1  Vydia          vydia
[2018-09-24 14:19:34 EDT] <main> DBG-X: Returning 0

$ irb
2.2.2 :001 > require "itunes/store/transporter"
 => true 
2.2.2 :002 > itms = iTunes::Store::Transporter.new(username: "myuser", password: "mypassword")
 => #<ITunes::Store::Transporter::ITMSTransporter:0x007fbbbca3c030 @defaults={:username=>"myuser", :password=>"mypassword"}, @config={:path=>nil, :print_stdout=>nil, :print_stderr=>nil}> 
2.2.2 :003 > itms.providers
ITunes::Store::Transporter::ExecutionError: java.lang.reflect.InvocationTargetException

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  at java.lang.reflect.Method.invoke(Method.java:498)

  at com.apple.transporter.launcher.Application.start(Application.java:206)

  at com.apple.transporter.launcher.Application.main(Application.java:519)

Caused by: java.lang.IllegalStateException: could not find needed OSGiFramework

  at com.apple.transporter.bootstrap.BootstrapHelper.setupClassLoader(BootstrapHelper.java:160)

  at com.apple.transporter.osgi.FelixOSGiBootstrapper.bootstrap(FelixOSGiBootstrapper.java:21)

  ... 6 more

  from /Users/murty/.rvm/gems/ruby-2.2.2/gems/itunes_store_transporter-0.2.1/lib/itunes/store/transporter/command.rb:69:in `handle_error'
  from /Users/murty/.rvm/gems/ruby-2.2.2/gems/itunes_store_transporter-0.2.1/lib/itunes/store/transporter/command.rb:42:in `run'
  from /Users/murty/.rvm/gems/ruby-2.2.2/gems/itunes_store_transporter-0.2.1/lib/itunes/store/transporter/itms_transporter.rb:217:in `run_command'
  from /Users/murty/.rvm/gems/ruby-2.2.2/gems/itunes_store_transporter-0.2.1/lib/itunes/store/transporter/itms_transporter.rb:205:in `block (2 levels) in <class:ITMSTransporter>'
  from (irb):3
  from /Users/murty/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'
2.2.2 :004 > 
sshaw commented 6 years ago

Hi,

What is the output of iTunes::Store::Transporter::Shell.default_path?

Can you call the method after using the :print_stderr => true option and paste the output here?

itms = iTunes::Store::Transporter.new(username: "myuser", password: "mypassword", :print_stderr => true)
murtyk commented 6 years ago

I am running this on Mac

2.2.2 :003 > itms = iTunes::Store::Transporter.new(username: "myuser", password: "mypassword", :print_stderr => true)
 => #<ITunes::Store::Transporter::ITMSTransporter:0x007fe756901790 @defaults={:username=>"myuser", :password=>"mypassword"}, @config={:path=>nil, :print_stdout=>nil, :print_stderr=>true}> 
2.2.2 :004 > iTunes::Store::Transporter::Shell.default_path
 => "/Applications/Xcode.app/Contents/Developer/../Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter" 
2.2.2 :005 > 
sshaw commented 6 years ago

Now that you've set :print_stderr => true can you execute itms.providers and add the output here?

When you run iTMSTransporter directly you're calling /usr/local/itms/bin/iTMSTransporter. I suggest passing in that path to iTunes::Store::Transporter.new and trying again:

itms = iTunes::Store::Transporter.new(username: "myuser", password: "mypassword", :print_stderr => true, :path => "/usr/local/itms/bin/iTMSTransporter")
sshaw commented 6 years ago

Closing due to lack of info and my inability to reproduce this issue.

Feel free to reopen if you have more info.