fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.62k stars 5.72k forks source link

New instance of Spaceship? #3542

Closed fastlanebot closed 9 years ago

fastlanebot commented 9 years ago
Original issue by @mcactive - Imported from fastlane/spaceship#79

Is it possible to start a new instance of Spaceship?

If tried to use the solution of #2, but it gives me the error:

/Users/micha/.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.3.3/lib/spaceship/client.rb:58:in `hostname': You must implemented self.hostname (RuntimeError)
    from /Users/micha/.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.3.3/lib/spaceship/client.rb:62:in `initialize'
    from test.rb:20:in `new'
    from test.rb:20:in `updateStatus'
    from test.rb:38:in `block in <main>'
    from test.rb:36:in `each'
    from test.rb:36:in `<main>'

Just trying to login again doesn't work. In the spaceship.log it shows that a new login actually logs the user out, but does not login again..

For me it is not necesarry to keep the current session, just want a new Spaceship session in the same ruby script..

fastlanebot commented 9 years ago
@KrauseFx commented

Does this help?

fastlanebot commented 9 years ago
@mcactive commented

It does help if you provide the credentials in the login, but with only the e-mail address and the password out of keychain, it fails:

/Users/micha/.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.3.3/lib/spaceship/portal/portal_client.rb:46:in `send_login_request': #<Faraday::Response:0x007f9635d5c488> (Spaceship::Client::InvalidUserCredentialsError)
    from /Users/micha/.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.3.3/lib/spaceship/client.rb:152:in `login'
    from /Users/micha/.rvm/gems/ruby-2.2.1@global/gems/spaceship-0.3.3/lib/spaceship/launcher.rb:25:in `initialize'
    from test.rb:26:in `new'
    from test.rb:26:in `updateStatus'
    from test.rb:43:in `block in <main>'
    from test.rb:41:in `each'
    from test.rb:41:in `<main>'
fastlanebot commented 9 years ago
@KrauseFx commented

So if you only pass the email address it doesn't work and if you pass user + password it works?

fastlanebot commented 9 years ago
@mcactive commented

Exactly!

If I pass the e-mail address, the first instance works perfectly fine, but the second one fails. If I pass email + pass both work fine.

fastlanebot commented 9 years ago
@KrauseFx commented

Okay, sorry about this. There are 2 solutions for you now:

fastlanebot commented 9 years ago
@mcactive commented

CredentialsManager::PasswordManager.logout does the trick for me, 'cause I don't need two instances at the same time. Thanks!

fastlanebot commented 9 years ago
@KrauseFx commented

Great to hear :+1: I'll leave this issue open as it needs to get resolved soon.

fastlanebot commented 9 years ago
@KrauseFx commented

This should be resolved with the latest update. Could you give it a try?