particle-iot/spark-cli

spark subscribe fails silently when not logged in

Opened this issue · 5 comments

zsup commented

If you're not logged in, spark subscribe fails. That's totally fine as you don't have credentials, but it doesn't show an error message, so for a while I thought that spark subscribe was broken; it took me a bit to realize that I needed to log in (after which point it worked).

@zsup, is it an expired access token or no login?

I just spark logout and tested the subscribe:

KEN-MBP:~ kennethlimcp$ spark subscribe
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ spark subscribe mine
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ spark subscribe events
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ 
zsup commented

Oh good call. Probably an expired token then?

On Tuesday Jan 6, 2015 at 4:21 PM, Kenneth Lim notifications@github.com, wrote:

@zsup, is it an expired access token or no login?

I just spark logout and tested the subscribe:

KEN-MBP:~ kennethlimcp$ spark subscribe
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ spark subscribe mine
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ spark subscribe events
You're not logged in.  Please login using "spark cloud login" before using this command 
KEN-MBP:~ kennethlimcp$ 

Reply to this email directly or view it on GitHub:
#128 (comment)

There has been some similar situations like this before. I'm thinking it might be:

1.) Expired access token
2.) First time new installation

I'm on latest version 0.4.92 when i did the test.

@emilyrose,

i verified that this has to do with an expired token and the checks to verify that the access token is not expired isn't working.

Steps to reproduce:

1.) perform a spark logout
2.) enter your password and remove the access token
3.) Copy the access token and go to the .spark folder
4.) Paste the access token and enter your user name (remember the " ")
5.) try spark subscribe and you will see it end abruptly