Author Topic: Oak CLI will not log into Particle  (Read 8344 times)

pkourany

  • Newbie
  • *
  • Posts: 25
Oak CLI will not log into Particle
« on: November 22, 2016, 07:41:56 am »
Running Oak CLI 1.0.2 pops up a CMD window which then closes immediately.  Deleting the oak directory (and thus config.json) and retrying causes the app to ask for login credentials.  With valid credentials, the app exits immediately and next time I run it again, it asks for credentials again.
« Last Edit: November 22, 2016, 10:52:10 am by pkourany »

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Oak CLI will not log into Particle
« Reply #1 on: November 22, 2016, 11:01:47 am »
No error message as to why? Did it create a config.json? If so, to the contents look right?

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oak CLI will not log into Particle
« Reply #2 on: November 22, 2016, 03:15:15 pm »
Another thing to consider (although it may just be coincidental) is that the Particle folk have just opened up their infrastructure to Raspberry Pi owners... (went live about six hours ago)... so their infrastructure may have been hammered by RPi Fanatics ;) Hopefully they didn't change something about their account system that the oak cli relies on... I'm wit exeng on that one... no error messages at all? no config file? you may find it better to run it from the command prompt so you can see it if any errors flashed up and the window closed before you could see them.

pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #3 on: November 24, 2016, 04:30:05 pm »
Running oak.exe from a DOS prompt and entering a valid username/password gives this:
Quote
OakCLI tool version 1.0.2

nexe.js:43674
    { throw '`items` must be Array (max length: 35).'; }
      ^
`items` must be Array (max length: 35).

The oak directory under roaming is never created.  It does the same thing on another PC running Win 10 as well.
« Last Edit: November 24, 2016, 04:31:37 pm by pkourany »

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oak CLI will not log into Particle
« Reply #4 on: November 24, 2016, 05:22:50 pm »
Check if there is an Oak directory under Local (%appdata%\..\Local vs %appdata%\..\Roaming) and delete that one if it is present.

Hm... that doesn't look very friendly...

I just tried a new login on my system (W10 - renamed the oak folder), and after entering my username and password, it showed my devices, and wrote the config file once I picked one to manage/upload to, that that was v1.0.2 also. So it doesn't appear to be a Particle issue. Are there any funny characters in the oak names (or no names at all?). And am I understanding correctly that oak-cli had worked fine in the past and suddenly stopped working?


pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #5 on: November 28, 2016, 09:37:49 am »
Well, I tried building OakCLI with different version of nodejs on different win10 PC and I keep getting the same error.  The OakCLI used to work and when I had issues before I simply deleted config.json which got rebuilt when I logged back in.  Now, it simply throws that error and I have not idea why.

I also tried a fresh download of OakCli from the digistump wiki and tried to run it on Win7 PC and got the same results.  I even tried disable antivirus with no success.  I'm giving up.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oak CLI will not log into Particle
« Reply #6 on: November 28, 2016, 05:30:28 pm »
Sorry couldn't help you there... it was rather strange that it accepted my file but wouldn't rebuild yours. In a last ditch effort, if you do think it is something to do with the access token that is wrong, I believe you can reset that on Particle Build, under the gear/Settings tab (blue Reset Token button). Other than that, I have no idea what is going on. I have yet to have any issues with it other than it once corrupting it's config or something, but it has been fine for me since then.

pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #7 on: November 30, 2016, 10:25:42 am »
Peter, tried resetting the token and still not working.  I am getting a new laptop soon and I will try again then to see what happens.

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Oak CLI will not log into Particle
« Reply #8 on: November 30, 2016, 02:09:42 pm »
If you are able to build the Oak CLI  I would  be  tempted to sprinkle  some console output around to see what proceeds the error throw from  nexe.js. I would guess it's trying to parse something from/for the CLI.  But it's just a guess. May help to narrow the problem.

pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #9 on: December 01, 2016, 05:52:15 am »
Looking at the oak.js dependencies, I see that spark v1.1.0 is included.  However, Particle has deprecated that package and replaced it with particle-api-js v6.4.0.  I'm asking the Particle folks if this is a problem or not and if the new package is a drop-in replacement.  My understanding is that the login form components have not been ported so if OakCLI uses these, code may need to be updated.

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Oak CLI will not log into Particle
« Reply #10 on: December 01, 2016, 08:40:51 am »
Just a thought... You originally  deleted the Oak directory.  Did you also do an uninstall then reinstall of the Oak libraries from the Arduino IDE?


pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #11 on: December 05, 2016, 11:11:18 am »
I uninstalled and reinstalled the oak libraries and OakCLI still does not work.

pkourany

  • Newbie
  • *
  • Posts: 25
Re: Oak CLI will not log into Particle
« Reply #12 on: December 14, 2016, 06:23:47 pm »
Brand new Dell laptop running latest Win 10.  McAfee AV running and not much else.  Installed Arduino IDE 1.6.12 and the oak package.  Downloaded Oak CLI, ran it and GOT THE SAME BEHAVIOR!!!

So, I would say there is something not right about Oak CLI running on the latest Win 10.  Or something is not right with Oak CLI.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Oak CLI will not log into Particle
« Reply #13 on: December 14, 2016, 10:57:10 pm »
wtf is going on? I haven't had any problems with with either of the x64 Win10 boxes I've programmed the Oaks (and run OakCLI).... but that doesn't discount that being a factor. It might be worth double check the naming of your Oaks - I've noticed that Particle Build will let you use spaces and symbols but the Particle Console won't when setting the name, and perhaps a character OakCLI doesn't like is being introduced? Other than that, I don't know what else is left...

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Oak CLI will not log into Particle
« Reply #14 on: December 15, 2016, 08:39:55 am »
Don't understand why pkourany is having such a problem. I've been running OakCLI without issue on my WIN 8.1 system. I have a WIN 10 and when I get a chance in the next day or so I'll give it a try. Also have a WIN 7 system I can try it on.

It would be good to get to the bottom of this. Would still like to see a custom build with some debug output to narrow down what is going on just before the error message.