particle-iot/spark-cli

no prompt to create new account

Closed this issue · 5 comments

With the update of version 1.0.0 we are handling the Serial-port exception well but it doesn't allow spark setup to flow and enter the next step of setting up an account account instead.

See: https://community.spark.io/t/tutorial-local-cloud-1st-time-instructions-03-march-15/5589/92

@emilyrose,

Use V1.0.0
1.) Perform a spark logout
2.) Use spark setup to create a new account
3.) The account creation will not be complete with this error:

Trying to login...
Could not get new access token:  User credentials are invalid
login error:  invalid_grant
Using the setting "username" instead 
Error setting up your core: Unable to login or create a new account

There are a couple of mixed issues that i am seeing:

1.) Spark setup is not recognizing that the username/password enter is not an available account. It should and prompt you to re-enter the password in order to create a new account

Somehow along this line: https://github.com/spark/spark-cli/blob/master/commands/SetupCommand.js#L144 is not being invoked

Using 0.4.94 worked fine with:

Setup your account

Could I please have an email address?  kennethlimcp1@gmail.com
and a password?  *******

Trying to login...
*********************************
      Please login - it appears your access_token may have expired
*********************************
Login failed, Lets create a new account!
confirm password  *******

2.) Spark login is also somehow not detecting that the credentials entered are not for an existing account (need to test again but i will end up creating dummy accounts)

Trying to hunt this bug down and might be this PR changes for login: 41ffc4e

bump, ran into this again today.

fixed this because I need it right now