[ISSUE] Unable to Sign-In, Cloud flash fails

In Workbench I’ve logged in using 2FA, but I’m still getting this error when I try to Partical Cloud Flash:

Flash device failed: You’re not logged in. Please login using particle cloud login before using this command
Error: Command failed: C:\Users\Milton.vscode\extensions\particle.particle-vscode-core-1.4.6\src\cli\bin\windows\amd64\particle.exe cloud flash collision_detection --target 1.1.0 --no-update-check

Flash device failed: You’re not logged in. Please login using particle cloud login before using this command

at makeError (C:\Users\Milton\.vscode\extensions\particle.particle-vscode-core-1.4.6\node_modules\execa\index.js:174:9)
at module.exports.Promise.all.then.arr (C:\Users\Milton\.vscode\extensions\particle.particle-vscode-core-1.4.6\node_modules\execa\index.js:278:16)

@MiltSchreiber that’s odd. you’ll get that error when you are signed-out - are you sure you are signed in?

to confirm, you can run the Particle: Launch CLI command from within Workbench, then run particle whoami in the terminal instance that launches. if it prompts you to login, go ahead and try logging in again.

once you’ve confirmed you are signed in, you can see your token and username in a file named particle.config.json located within your ~/.particle/ directory (on windows, that’s typically in C:\Users\<you>\.particle)

Thank you @m_m. The CLI login worked perfectly, and I was able to flash my Argon.

I tested Particle: Login in the command pallette. Even though it says I’m logged in, I am actually not based on Particle Whoami. Appears there is something wrong with Particle Login in the command pallette. Could be a 2FA issue??

@MiltSchreiber are you saying that running the Particle: Who am I? command within Workbench produces different results than if you run it in the terminal directly by running the Particle: Launch CLI command then running particle whoami?

if so, that’s super-odd. only thing i can think of is to try running Get-Command particle | Select-Object -ExpandProperty Definition (windows equivalent of unix’s which command) in the terminal that launches after running the Particle: Launch CLI command and sharing the output here. but again, under the hood even if you have two copies of the Particle CLI, they should share the same particle.config.json file such that if you are signed in with one, the other is as well. do you perhaps have multiple *.config.json files within your C:\Users\<you>\.particle directory?

To test I deleted particle.config.json. (There was only one copy.) Then I logged in using Particle Login from the command palette. I got the message that I was now logged in. The file particle.config.json was created containing token and user name. I then went into the Particle CLI and did a Particle Whoami, and it replied that I’m not logged in.

Bottom line: I can login successfully using Particle CLI, but not Particle Login from the command palette.

I ran Get-Command particle | Select-Object -ExpandProperty Definition as you suggested. Tried to copy screen shot of results below, but I’m new to this forum. Not sure if you will be able to see it…


:thinking: i wonder if it’s somehow related to your drive configuration?

note that in the screengrab you posted, the particle executable lives in:


…that is, on the C: drive. while your PS prompt shows:


…where the root is E:

do you have two .particle directories? specifically, do these both exist by chance?




Excluding Workbench which ships with its own copy, did you install the Particle CLI stand-alone at any time?

Finally, can you confirm the exact steps you are taking - something like:

1. launch Particle Workbench
2. run the `Particle: Who am I?` command
3. see that i'm logged out, run `Particle: Login` command
4. provide login credentials, see "success" message
5. run the `Particle: Launch CLI` command
6. execute `particle whoami` in the terminal instance that is launched

cli reports my signed-in username

cli reports i am signed out

thanks - very much appreciate your help troubleshooting this :pray::+1:

You are so right! There are two instances of particle.config.json one in the C: drive and one in the E: drive.

ah, ok. hmmmmm… now which one is the “right” one?

if you don’t mind, try this:

  1. open powershell
  2. type ~/ and then press the <tab> key
  3. share the path that step 2 expands to
  4. in that same powershell terminal, run Get-Command particle | Select-Object -ExpandProperty Definition
  5. share the path output by step 4
  6. launch Particle Workbench
  7. run the Particle: Audit Environment command
  8. review the report it generates and share the APPDATA, HOMEDRIVE, HOMEPATH, and USERPROFILE fields included in the env: section as well as the entire platform section

thanks again :pray::+1:

Path from Step 2: C:\Users\Milton.config\

This is what I get when I do step 4.

PS C:\Users\Milton> Get-Command Particle | Select-Object -ExpandProperty Definition
Get-Command : The term ‘Particle’ is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • Get-Command Particle | Select-Object -ExpandProperty Definition
  •   + CategoryInfo          : ObjectNotFound: (Particle:String) [Get-Command], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

From Step 8.
“APPDATA”: “C:\Users\Milton\AppData\Roaming”
“HOMEPATH”: “\Users\Milton”,
“USERPROFILE”: “C:\Users\Milton”

“platform”: {
“os”: “windows”,
“type”: “Windows_NT”,
“release”: “10.0.17134”,
“arch”: “x64”,
“path”: {
“key”: “Path”,
“value”: “C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\WINDOWS\System32\OpenSSH\;C:\Users\Milton\AppData\Local\Microsoft\WindowsApps;%DASHLANE_DLL_DIR%;C:\Users\Milton\AppData\Local\Programs\Microsoft VS Code\bin”
“homeDir”: “C:\Users\Milton”,
“particleDir”: “C:\Users\Milton\.particle”,
“localCompilerToolchainDir”: “C:\Users\Milton\.particle\toolchains”

Hope this helps.

1 Like

thanks. ok, so it looks like the correct user directory is:


and thus your config should live in:


with that in mind, i would:

  1. delete the E:\Users\Milton\.particle\particle.config.json file
  2. sign-in via Particle Workbench:
    a: launch VSCode + Workbench
    b: run the Particle: Login command
    c: provide your credentials
    d: confirm you see the “success” message
  3. confirm the E:\Users\Milton\.particle\particle.config.json file has not been recreated

share what you find here :pray::+1: