[Issue] Particle Workbench Extension Error (command not found)

Hi all,

I’m struggling for a few days now with the Particle workbench extension in MS Visual Studio Code. A couple of months ago everything was working flawlessly, but with the latest versions it seems like the extension is not executed correctly on my Mac.

Symptoms:

This is completely blocking me as I’m unable to build any updates or new versions of my Particle firmwares.

What I tried so far:

  • Update everything to the latest version (see below)
  • Uninstall Particle workbench extension and install it again
  • Uninstall MS Visual Studio Code and install it again
  • Install the Particle workbench SW-package including MS Visual Studio Code from the Particle website

These are the SW-versions I run:

  • Mac OS v10.15.6
  • Particle CLI v2.7.2
  • Visual Studio Code v1.47.2
  • Particle Workbench v1.12.1

Unfortunately, I haven’t found a thread from someone experiencing the same issues AND fixing it (this was not helpful). In case I missed something, kindly let me know which one might help in my case.

Many thanks in advance for your advice and help!
Regards, Tim

ping @m_m

@ruKe if you haven’t already, please try these suggestions:

…and report back with your findings. additionally, can you share the output of these commands:

ls -la ~/.vscode/extensions/
ls -la ~/.particle/
ls -la ~/.particle/toolchains

thanks :pray:

2 Likes

@m_m thanks for reaching out to me! See below the results, I hope this is more helpful to you than it is to me :wink:

From VSCode’s main menu, select “Help” > “Toggle Developer Tools” then when that panel appears, switch over to the “console” tab, try to launch the “Welcome” screen, and look for any interesting errors.

This is what I get:

Activating extension 'ms-vscode.cpptools' failed: Cannot find module '/Users/Tim/.vscode/extensions/ms-vscode.cpptools-0.29.0/dist/main'
Require stack:
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js.
_logMessageInConsole @ /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4279
/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4279

Cannot activate extension 'Workbench Core' because it depends on extension 'ms-vscode.cpptools', which failed to activate.
_logMessageInConsole @ /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4279
/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4279

Cannot activate extension 'Arduino' because it depends on extension 'ms-vscode.cpptools', which failed to activate.
_logMessageInConsole @ /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4279
/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1670   ERR No application in the Launch Services database matches the input criteria.: Error: No application in the Launch Services database matches the input criteria.

From VSCode’s main menu, select “View” > “Output”, then try to launch the “Welcome” screen, and then cycle through the various logs (look for the drop-down menu in the panel toolbar top-right) and look for any interesting errors.

The log “Extension Host” looked interesting to me, see below:

[2020-07-20 19:29:54.508] [exthost] [info] extension host started
[2020-07-20 19:29:54.528] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"extensionId":{"value":"vscode.debug-auto-launch","_lower":"vscode.debug-auto-launch"},"activationEvent":"*"}
[2020-07-20 19:29:54.528] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/debug-auto-launch/dist/extension
[2020-07-20 19:29:54.534] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"extensionId":{"value":"vscode.emmet","_lower":"vscode.emmet"},"activationEvent":"*"}
[2020-07-20 19:29:54.534] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/dist/extension
[2020-07-20 19:29:54.547] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-07-20 19:29:54.547] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/main
[2020-07-20 19:29:54.587] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication {"startup":true,"extensionId":{"value":"vscode.github-authentication","_lower":"vscode.github-authentication"},"activationEvent":"*"}
[2020-07-20 19:29:54.588] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js
[2020-07-20 19:29:54.604] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"extensionId":{"value":"vscode.merge-conflict","_lower":"vscode.merge-conflict"},"activationEvent":"*"}
[2020-07-20 19:29:54.604] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/dist/mergeConflictMain
[2020-07-20 19:29:54.608] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication {"startup":true,"extensionId":{"value":"vscode.microsoft-authentication","_lower":"vscode.microsoft-authentication"},"activationEvent":"*"}
[2020-07-20 19:29:54.608] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/microsoft-authentication/dist/extension.js
[2020-07-20 19:29:54.614] [exthost] [info] ExtensionService#_doActivateExtension vscode.search-result {"startup":true,"extensionId":{"value":"vscode.search-result","_lower":"vscode.search-result"},"activationEvent":"*"}
[2020-07-20 19:29:54.614] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/search-result/dist/extension.js
[2020-07-20 19:29:54.616] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.atom-keybindings {"startup":true,"extensionId":{"value":"ms-vscode.atom-keybindings","_lower":"ms-vscode.atom-keybindings"},"activationEvent":"*"}
[2020-07-20 19:29:54.616] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/.vscode/extensions/ms-vscode.atom-keybindings-3.0.8/extension
[2020-07-20 19:29:54.618] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {"startup":true,"extensionId":{"value":"vsciot-vscode.vscode-arduino","_lower":"vsciot-vscode.vscode-arduino"},"activationEvent":"*"}
[2020-07-20 19:29:54.618] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/.vscode/extensions/ms-vscode.cpptools-0.29.0/dist/main
[2020-07-20 19:29:54.620] [exthost] [info] ExtensionService#_doActivateExtension marus25.cortex-debug {"startup":true,"extensionId":{"value":"particle.particle-vscode-core","_lower":"particle.particle-vscode-core"},"activationEvent":"*"}
[2020-07-20 19:29:54.620] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/.vscode/extensions/marus25.cortex-debug-0.3.7/dist/extension
[2020-07-20 19:29:54.655] [exthost] [error] Activating extension ms-vscode.cpptools failed due to an error:
[2020-07-20 19:29:54.657] [exthost] [error] Error: Cannot find module '/Users/Tim/.vscode/extensions/ms-vscode.cpptools-0.29.0/dist/main'
Require stack:
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
	at Function.Module._resolveFilename (internal/modules/cjs/loader.js:762:15)
	at Module._load (internal/modules/cjs/loader.js:667:27)
	at Module._load (electron/js2c/asar.js:717:26)
	at Function.Module._load (electron/js2c/asar.js:717:26)
	at Function.t._load (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:974:348)
	at Function.i._load (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:943:839)
	at Function.n._load (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:940:198)
	at Module.require (internal/modules/cjs/loader.js:820:19)
	at require (internal/modules/cjs/helpers.js:68:18)
	at Function.s [as __$__nodeRequire] (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:33:205)
	at h._loadCommonJSModule (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:945:34)
	at h._doActivateExtension (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:835:599)
	at h._activateExtension (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:834:692)
	at Object.actualActivateExtension (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:832:453)
	at h._activateExtension (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:601:405)
	at /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:601:83
	at Array.map (<anonymous>)
	at h._activateExtensions (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:601:71)
	at h._activateExtensions (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:601:140)
	at h.activateByEvent (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:598:546)
	at h._activateByEvent (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:833:300)
	at h._handleEagerExtensions (/Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:838:218)
	at /Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:841:872
	at processTicksAndRejections (internal/process/task_queues.js:85:5)
[2020-07-20 19:29:54.826] [exthost] [info] ExtensionService#_doActivateExtension vscode.github {"startup":true,"extensionId":{"value":"vscode.github","_lower":"vscode.github"},"activationEvent":"*"}
[2020-07-20 19:29:54.827] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/Tim/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github/dist/extension.js
[2020-07-20 19:29:54.848] [exthost] [info] eager extensions activated
MacBook-Pro:~ Tim$ ls -la ~/.vscode/extensions/
total 0
drwxr-xr-x  14 Tim  staff   448 20 Jul 16:21 .
drwxr-xr-x   4 Tim  staff   128 24 Nov  2019 ..
drwxr-xr-x   8 Tim  staff   256 31 Okt  2018 codealb.codealb-0.0.1
drwxr-xr-x   9 Tim  staff   288 11 Mär  2019 felixfbecker.php-debug-1.13.0
drwxr-xr-x  15 Tim  staff   480 16 Jul 17:32 marus25.cortex-debug-0.3.7
drwxr-xr-x  35 Tim  staff  1120 17 Jul 23:40 ms-python.python-2020.7.94776
drwxr-xr-x  16 Tim  staff   512  6 Mai 13:05 ms-vscode.atom-keybindings-3.0.8
drwxr-xr-x  28 Tim  staff   896 16 Jul 17:31 ms-vscode.cpptools-0.29.0
drwxr-xr-x   7 Tim  staff   224 20 Jul 16:21 particle.particle-vscode-core-1.12.1
drwxr-xr-x   7 Tim  staff   224 20 Jul 16:21 particle.particle-vscode-pack-1.12.1
drwxr-xr-x   7 Tim  staff   224 20 Jul 16:21 particle.particle-vscode-snippets-1.12.1
drwxr-xr-x   7 Tim  staff   224 20 Jul 16:21 particle.particle-vscode-theme-1.12.1
drwxr-xr-x  12 Tim  staff   384 17 Jul 23:40 tobiasalthoff.atom-material-theme-1.10.3
drwxr-xr-x  14 Tim  staff   448 16 Jul 17:31 vsciot-vscode.vscode-arduino-0.3.1
MacBook-Pro:~ Tim$ ls -la ~/.particle/
total 1544
drwxr-xr-x   13 Tim  staff     416 16 Jul 17:32 .
drwxr-xr-x@  76 Tim  staff    2432 12 Apr 23:44 ..
drwxr-xr-x  436 Tim  staff   13952 16 Jul 17:32 .npm-cache
-rw-r--r--    1 Tim  staff      52 16 Jul 17:31 autoupdate
-rw-r--r--    1 Tim  staff  120889 16 Jul 17:32 error.log
drwxr-xr-x    9 Tim  staff     288 31 Mär 19:09 node-v12.16.1-darwin-x64
drwxr-xr-x  440 Tim  staff   14080 16 Jul 17:32 node_modules
-rw-r--r--    1 Tim  staff  636427 16 Jul 17:32 package-lock.json
-rw-r--r--    1 Tim  staff     276 20 Jul 16:18 particle.config.json
-rw-r--r--    1 Tim  staff      59 16 Jul 17:32 plugin-cache.json
-rw-r--r--    1 Tim  staff      41 20 Jul 16:17 profile.json
drwxr-xr-x    2 Tim  staff      64 31 Mär 19:09 tmp
drwxr-xr-x    7 Tim  staff     224 11 Mär  2019 toolchains
MacBook-Pro:~ Tim$ ls -la ~/.particle/toolchains
total 0
drwxr-xr-x   7 Tim  staff  224 11 Mär  2019 .
drwxr-xr-x  13 Tim  staff  416 16 Jul 17:32 ..
drwxr-xr-x  10 Tim  staff  320 29 Mär 17:21 buildscripts
drwxr-xr-x   7 Tim  staff  224  3 Nov  2019 buildtools
drwxr-xr-x  14 Tim  staff  448  1 Apr 13:02 deviceOS
drwxr-xr-x   4 Tim  staff  128  3 Jan  2019 gcc-arm
drwxr-xr-x   5 Tim  staff  160  3 Nov  2019 openocd

hm. ok, that does shine a bit more light on things - thanks :+1:

here’s the root cause:

Activating extension 'ms-vscode.cpptools' failed: Cannot find module '/Users/Tim/.vscode/extensions/ms-vscode.cpptools-0.29.0/dist/main'
Require stack:

workbench depends on that extension (as do many others as you can see) so it fails to load as well.

a quick scan of the issues over in https://github.com/microsoft/vscode-cpptools shows a few perhaps related items:


TL;DR - try this:

  1. disable all extensions (docs) except for these:
ms-vscode.cpptools
marus25.cortex-debug
particle.particle-vscode-core
particle.particle-vscode-pack
particle.particle-vscode-snippets
particle.particle-vscode-theme
  1. if you are on a corporate network with unknown restrictions, etc. and able to, try connecting from a different, less locked-down network (iow, let’s rule out proxy-related weirdness if we can)

  2. try reinstalling (docs: 1, 2) and / or downgrading (docs) the ms-vscode.cpptools extension

let me know how it goes :pray::+1:

@m_m thanks for looking into it!

Uninstalling ms-vscode.cpptools and installing it again finally did the trick for me: after that, the installation of the particle workbench took much longer than just a few seconds during my previous tries. I guess w/o ms-vscode.cpptools working properly, even the installation of the particle workbench isn’t working as it should.

Anyway, thanks a lot for your help :slightly_smiling_face:

1 Like