rubymotion-community / motion-provisioning

Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.
Other
46 stars 20 forks source link

Two step verification is not working #4

Closed wndxlori closed 8 years ago

wndxlori commented 8 years ago

When I ran rake device after setting up the gem, I got this error


Info Your Apple ID email: loriolson@mac.com
      Info Do you want to save the email to the config file ('provisioning/config.yaml') so you dont have to type it again? (Y/n): 
      Info Logging into the Developer Portal with email 'loriolson@mac.com'.
Two Step Verification for account 'loriolson@mac.com' is enabled
Please select a device to verify your identity
rake aborted!
undefined method `choose' for #<Spaceship::PortalClient:0x007f94ae241428>
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/spaceship-0.31.7/lib/spaceship/two_step_client.rb:35:in `handle_two_step'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/spaceship-0.31.7/lib/spaceship/client.rb:295:in `send_shared_login_request'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/spaceship-0.31.7/lib/spaceship/portal/portal_client.rb:35:in `send_login_request'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/spaceship-0.31.7/lib/spaceship/client.rb:352:in `do_login'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/motion-provisioning-0.0.3/lib/motion-provisioning.rb:67:in `client'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/motion-provisioning-0.0.3/lib/motion-provisioning/certificate.rb:18:in `client'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/motion-provisioning-0.0.3/lib/motion-provisioning/certificate.rb:54:in `certificate_name'
/Users/lori/.rvm/gems/ruby-2.0.0-p576@wimby/gems/motion-provisioning-0.0.3/lib/motion-provisioning.rb:194:in `certificate'

After I disabled two step verification, I was able to successfully finish the provisioning setup process.

MarkVillacampa commented 8 years ago

Thanks for the report!

I'll look into it and post back here.

MarkVillacampa commented 8 years ago

@wndxlori could you try the two-step-login branch and see if it solves the issue?

https://github.com/HipByte/motion-provisioning/tree/two-step-login

I tried to enable two step auth in my account but it would not let me for some reason :(

Youngv commented 8 years ago

Got the same error, then i try the branch two-step-login, get the error below

      Info Your Apple ID email: xxxxxxxxxxxxx@gmail.com
      Info Do you want to save the email to the config file ('provisioning/config.yaml') so you dont have to type it again? (Y/n): n
The login information you enter will be stored safely in the macOS keychain.
      Info Password for #<MotionProvisioning::Utils::Answer:0x007fcebc9ebe60>: **********
rake aborted!
NoMethodError: undefined method `shellescape' for #<MotionProvisioning::Utils::Answer:0x007fcebc9ebe60>
dam13n commented 8 years ago

@Youngv I made a fix if you want to use it: https://github.com/HipByte/motion-provisioning/pull/6

Youngv commented 8 years ago

@dam13n I use your forked repo with master branch, still have the same error as I posted above, I use a free apple developer account, does that bother?

dam13n commented 8 years ago

@Youngv I'm not sure what works with a free developer account, sorry. However, I'm surprised you'd get the same error if you are using my fork since the emails variable is no longer a MotionProvisioning::Utils::Answer object.

MarkVillacampa commented 8 years ago

@Youngv your error should be fixed with @dam13n's PR.

@dam13n free accounts are indeed supported.

This issue is about 2factor auth support. I need to wait 3 days to enable 2factor auth in my account, then I will look into this issue again.