vscode-f5 icon indicating copy to clipboard operation
vscode-f5 copied to clipboard

[BUG] Error running command f5.addHost: command 'f5.addHost' not found.

Open bbusner opened this issue 1 year ago • 33 comments

VSCode: 1.77.0 F5 Extension: 3.11.0

I get 'Error running command' when I click on any of the icons within the F5 page. For example, when I click on the '+' icon in F5 Hosts, I get the following error: 'Error running command f5.addHost: command 'f5.addHost' not found. This is likely caused by the extension that contributes f5.addHost.' I get very similar errors for any other action, such as Refresh Devices and Clear (in Config Explorer).

Developer tools shows me the same errors in addition to the following: 'Activating extension 'F5DevCentral.vscode-f5' failed: Cannot set property lastCheckDate of #<Object> which has only a getter. $onExtensionActivationError @ mainThreadExtensionService.ts:112'

When I check the runtime status in the extensions, it says 'Not yet activated'.

I did a full uninstall of VSCode (including removing the roaming folders) and reinstalled everything and get the same results. I am installing the extension from within VSCode Extension tab if that matters.

bbusner avatar Apr 04 '23 14:04 bbusner

Hi @bbusner ! Thanks for opening this issue. All the details you provide still indicate, to me, that there is something wrong the the main vscode installation. For some reason, the extension is not fully activating. In some rare instances, I have had to not only uninstall vscode, but also delete the directory and remaining files. Maybe even a host computer reboot.

Are you on windows, linux or mac?

This thread has some details about the different locations https://stackoverflow.com/questions/30263459/visual-studio-code-install-location

DumpySquare avatar Apr 04 '23 16:04 DumpySquare

VSCode: 1.77.2 F5 Extension: 3.11.0 OS: Windows 10

VSCode: 1.75.1 F5 Extension: 3.11.0 OS: Windows 10

Hello @DumpySquare we are getting same issue as @bbusner on multiple devices, running on Windows.

faervin avatar Apr 12 '23 04:04 faervin

I've just hit this issue as well.

walterk82 avatar Jun 06 '23 15:06 walterk82

@walterk82 . Thanks. All the signs still point to a problem with vscode itself. Are you seeing any issues with any of the other extensions installed? Have you tried to uninstall vscode and re-install?

DumpySquare avatar Jun 06 '23 15:06 DumpySquare

I uninstalled the F5 extension, VS Code and deleted %APPDATA%\Code and %USERPROFILE%.vscode as documented in the Clean Uninstall section here: https://code.visualstudio.com/docs/setup/uninstall. I then installed the latest VS Code followed by the F5 extension. VS Code: 1.78.2 F5 Extension: 3.12.2

I still get the same errors. It seems that all the errors from clicking on things within the F5 extension window are due to the extension not activating. I see this when I open Dev Tools : Activating extension 'F5DevCentral.vscode-f5' failed: Cannot set property lastCheckDate of #<Object> which has only a getter.

I installed the official Python extension as well as F5 Networks iRules extension and confirmed that they both work as expected.

I'm not sure what would be unique about my installation. My laptop is configured to use a corporate HTTP proxy, but the errors do not appear to be related to any HTTP requests and it didn't seem to have trouble installing the extension through the Marketplace.

bbusner avatar Jun 06 '23 17:06 bbusner

thank everyone. I do have this extension loader that is there just tell me how long it takes to load the extension. I wanted to some visibility into when the extension was starting todo a bit too much at load time.

https://github.com/f5devcentral/vscode-f5/blob/main/src/extLoader.ts

I will look at bypassing this for the next release to see if this gets things working for you.

DumpySquare avatar Jun 06 '23 19:06 DumpySquare

fix in the pending 3.13 release

DumpySquare avatar Jun 20 '23 13:06 DumpySquare

I've updated to 3.13 but I still get an activation error:

image

walterk82 avatar Jun 21 '23 03:06 walterk82

I performed a full uninstall of the extension and VSCode then reinstalled the latest VS Code (1.79.2) and the updated F5 extension (v3.13.0).

I see the same behavior as before. My Runtime status indicates it is 'Not yet Activated' although I don't see any read property errors like @walterk82. image

The console output in Dev tools shows the same activation error that I've seen on the previous versions:

Activating extension 'F5DevCentral.vscode-f5' failed: Cannot set property lastCheckDate of #<Object> which has only a getter.
$onExtensionActivationError @ workbench.desktop.main.js:1972

bbusner avatar Jun 21 '23 12:06 bbusner

Thanks everyone. I made some more telemetry tweaks that will release soon. Thanks again for the feedback and patients

DumpySquare avatar Jun 21 '23 13:06 DumpySquare

I've tested the new release but I'm still having activation difficulty.

image

walterk82 avatar Jun 21 '23 17:06 walterk82

I get the same "Not Yet Activated". How do we get past this?

VSCode Version: 1.80.0 OS: Win 10

F5 Extension version: 3.13.1

pedley-f5 avatar Jul 08 '23 13:07 pedley-f5

I get the same "Not Yet Activated". How do we get past this?

VSCode Version: 1.80.0 OS: Win 10

F5 Extension version: 3.13.1

@pedley-f5 , can you please uninstall vscode and remove it's directory?

%USERPROFILE%/.vscode

similar to this issue: https://github.com/microsoft/vscode-python/issues/18109#issuecomment-985980956

And to everyone else, I haven't forgotten about you. I've made a dozen changes to attempt to fix this. It's nothing been able to reproduce or see in any of my installs or demos. All the errors indicated in this issue, talk about the extension failing to load or a command failing, but the details behind those errors almost seem to be different every time, like a corrupt install.

Maybe it has something to do with the fact that it activates on vscode load "$onExtensionActivationError @ mainThreadExtensionService.ts:112'". I will look at changing when/how vscode activates. It might be trying to load too much too soon.

I'm also looking at moving functionality into other extensions and providing an extension pack. This will help isolate issues, streamline updates, and enable some flexibility.

I really appreciate all the support, patience and feedback here. I'm still working on this.

Ben

DumpySquare avatar Jul 08 '23 19:07 DumpySquare

I just push an update. We'll see how it affects this issue

DumpySquare avatar Jul 08 '23 20:07 DumpySquare

No change in behavior with v3.13.2. I tested the older versions, and it appears that v3.8.6 load fine. Once I go to v3.9.0, I get the same error I get on all the newer versions:

Activating extension 'F5DevCentral.vscode-f5' failed: Cannot set property lastCheckDate of #<Object> which has only a getter.
$onExtensionActivationError @ workbench.desktop.main.js:1972

On v3.8.6, I confirmed I was able to add a host, connect to it and various info such as iRules, RPMs, UCS, etc. Strangely, it only allows me to add a single host within the GUI extension. I get the following error when I click on the plus sign to add a new host: 199 [2023-07-10T15:25:40.835Z] [ERROR]: [object Object] exists or invalid format: <user>@<host/ip>:<port> I got this error on all the prior versions as well. I was able to import additional hosts by using the right-click import method.

It might help if other affected users can test v3.8.6 to see if it works for them. You can install this version by clicking the uninstall drop down on the F5 extension and selecting Install Another Version.

image

bbusner avatar Jul 10 '23 15:07 bbusner

ouuu. interesting. Lemme dig into that difference. Thanks!

DumpySquare avatar Jul 10 '23 15:07 DumpySquare

IF it helps, this is reported in the "Extension Host" Output console:

2023-07-10 13:24:49.539 [error] Activating extension F5DevCentral.vscode-f5 failed due to an error: 2023-07-10 13:24:49.539 [error] TypeError: Cannot set property lastCheckDate of #<Object> which has only a getter at AtcVersionsClient. (c:\Users\username.vscode\extensions\f5devcentral.vscode-f5-3.13.2\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:201:44) at Generator.next () at fulfilled (c:\Users\username.vscode\extensions\f5devcentral.vscode-f5-3.13.2\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:36:58) at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

walterk82 avatar Jul 10 '23 18:07 walterk82

Thanks @walterk82 , that does help. the more data the better.

I will also look at removing all the NEXT work I added during this time. NEXT will probably come later, in it's own extension. Here is the comparison https://github.com/f5devcentral/vscode-f5/compare/v3.8.6...v3.9.0

DumpySquare avatar Jul 10 '23 18:07 DumpySquare

To add some context network operations fail on this extension because http proxy support is not configured. Maybe the network startup calls are an issue for firewalled environments.

walterk82 avatar Jul 10 '23 18:07 walterk82

Got the same issue on 3.14. It was working but after VScode restart it stopped.

VSCode Version: 1.83.0 OS: Win 11 F5 Extension version: 3.14.0

In the extension console getting this

2023-10-04 02:44:43.487 [error] Activating extension F5DevCentral.vscode-f5 failed due to an error: 2023-10-04 02:44:43.487 [error] Error: libsecret-1.so.0: cannot open shared object file: No such file or directory at Module._extensions..node (node:internal/modules/cjs/loader:1338:18) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at u._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:154:5631) at c._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:151:29196) at t._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:118:35261) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (/home/user/.vscode-server/extensions/f5devcentral.vscode-f5-3.14.0/node_modules/keytar/lib/keytar.js:1:14) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at u._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:154:5631) at c._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:151:29196) at t._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:118:35261) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (/home/user/.vscode-server/extensions/f5devcentral.vscode-f5-3.14.0/out/extension.js:43:33) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at u._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:154:5631) at c._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:151:29196) at t._load (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:118:35261) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at Function.i [as __$__nodeRequire] (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/loader.js:5:98) at s.vb (/home/user/.vscode-server/bin/e7e037083ff4455cf320e344325dacb480062c3c/out/vs/workbench/api/node/extensionHostProcess.js:151:30375) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0)

t0m3kf avatar Oct 04 '23 23:10 t0m3kf

I get the below error.

VSCode Version: 1.83.0 OS: Win 11 F5 Extension version: 3.14.0

Log:

2023-10-06 20:40:00.488 [error] Activating extension F5DevCentral.vscode-f5 failed due to an error: 2023-10-06 20:40:00.488 [error] Error: \?\c:\Users\Foo.vscode\extensions\f5devcentral.vscode-f5-3.14.0\node_modules\keytar\build\Release\keytar.node is not a valid Win32 application. \?\c:\Users\Foo.vscode\extensions\f5devcentral.vscode-f5-3.14.0\node_modules\keytar\build\Release\keytar.node

Rambo721 avatar Oct 06 '23 15:10 Rambo721

Same error

VSCode Version 1.83.0 OS: OSX Ventura 13.5.2

Log:

[error] Activating extension F5DevCentral.vscode-f5 failed due to an error: 2023-10-16 14:27:55.733 [error] Error: dlopen(/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/node_modules/keytar/build/Release/keytar.node, 0x0001): tried: '/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/node_modules/keytar/build/Release/keytar.node' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/node_modules/keytar/build/Release/keytar.node' (no such file), '/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/node_modules/keytar/build/Release/keytar.node' (not a mach-o file) at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1869) at Module._extensions..node (node:internal/modules/cjs/loader:1401:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1869) at Module.load (node:internal/modules/cjs/loader:1171:32) at Module._load (node:internal/modules/cjs/loader:1012:12) at f._load (node:electron/js2c/asar_bundle:2:13377) at u._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:5631) at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:29196) at t._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:35261) at Module.require (node:internal/modules/cjs/loader:1195:19) at g (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:647) at Object. (/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/node_modules/keytar/lib/keytar.js:1:76) at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1271) at Module._extensions..js (node:internal/modules/cjs/loader:1371:10) at Module.load (node:internal/modules/cjs/loader:1171:32) at Module._load (node:internal/modules/cjs/loader:1012:12) at f._load (node:electron/js2c/asar_bundle:2:13377) at u._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:5631) at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:29196) at t._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:35261) at Module.require (node:internal/modules/cjs/loader:1195:19) at g (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:647) at Object. (/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/out/extension.js:54:33) at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1271) at Module._extensions..js (node:internal/modules/cjs/loader:1371:10) at Module.load (node:internal/modules/cjs/loader:1171:32) at Module._load (node:internal/modules/cjs/loader:1012:12) at f._load (node:electron/js2c/asar_bundle:2:13377) at u._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:5631) at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:29196) at t._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:35261) at Module.require (node:internal/modules/cjs/loader:1195:19) at g (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:647) at Object. (/Users/molina/.vscode/extensions/f5devcentral.vscode-f5-3.8.5/out/extLoader.js:15:21) at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1271) at Module._extensions..js (node:internal/modules/cjs/loader:1371:10) at Module.load (node:internal/modules/cjs/loader:1171:32) at Module._load (node:internal/modules/cjs/loader:1012:12) at f._load (node:electron/js2c/asar_bundle:2:13377) at u._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:5631) at c._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:29196) at t._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:117:35261) at Module.require (node:internal/modules/cjs/loader:1195:19) at require (node:internal/modules/cjs/helpers:110:18) at Function.i [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:98) at s.vb (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:30375) at async Promise.all (index 0)

artgmolina avatar Oct 16 '23 12:10 artgmolina

ok, I downloaded vscode 1.82.3 and all extensions were loaded successfully including F5 extension

artgmolina avatar Oct 16 '23 12:10 artgmolina

After the Visual Studio Code update to 1.83 extension stopped working, the error message: Error running command f5.addHost: command 'f5.addHost' not found. This is likely caused by the extension that contributes f5.addHost.

It works correctly on version 1.82.3.

michal-tomczak avatar Oct 19 '23 13:10 michal-tomczak

I'd like to second @michal-tomczak experience. The F5 extension works fine on 1.82.3. Also had the same experience as reported for 1.83. I've temporarily disabled automatic updates from MS VSCode for stability.

kbaum-13 avatar Oct 19 '23 18:10 kbaum-13

Hoping to have found the issue team. Just released 3.15. that should fix this. Please confirm

DumpySquare avatar Oct 26 '23 17:10 DumpySquare

VS Code: 1.83.1 OS: Win 10 F5 Extension: 3.15

I just upgraded the F5 extension to 3.15 and it appears to be working now. I haven't done any extensive testing yet, but I can at least connect to my BIG-IP devices and browse the configuration. I have not seen any errors yet. Thanks!

bbusner avatar Oct 26 '23 17:10 bbusner

I also have the problem that the extension is displayed as "not activated".

VS Code: 1.84.1 OS: Win 10 F5 Extension: v3.15.1

The problem only occurs with the device that has no internet access. The installation is done via VSIX file. Here I could find the following error message in the "Output" of VS Code (Extension host):

2023-11-07 14:35:09.736 [error] Activating extension F5DevCentral.vscode-f5 failed due to an error:
2023-11-07 14:35:09.736 [error] TypeError: Cannot set property lastCheckDate of #<Object> which has only a getter
	at AtcVersionsClient.<anonymous> (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:201:44)
	at Generator.next (<anonymous>)
	at fulfilled (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:36:58)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)_

If I run the same installation on a device with Internet access (also with VSIX), the extension works.

Thanks in advance!

ThBaumann-ladit avatar Nov 07 '23 14:11 ThBaumann-ladit

I also have the problem that the extension is displayed as "not activated".

VS Code: 1.84.1 OS: Win 10 F5 Extension: v3.15.1

The problem only occurs with the device that has no internet access. The installation is done via VSIX file. Here I could find the following error message in the "Output" of VS Code (Extension host):

2023-11-07 14:35:09.736 [error] Activating extension F5DevCentral.vscode-f5 failed due to an error:
2023-11-07 14:35:09.736 [error] TypeError: Cannot set property lastCheckDate of #<Object> which has only a getter
	at AtcVersionsClient.<anonymous> (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:201:44)
	at Generator.next (<anonymous>)
	at fulfilled (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\dist\bigip\atcVersionsClient.js:36:58)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)_

If I run the same installation on a device with Internet access (also with VSIX), the extension works.

Thanks in advance!

@ThBaumann-ladit; This is an interesting nuance. Can you please open a dedicated issue for this and I'll get it fixed. Thank you

DumpySquare avatar Nov 07 '23 16:11 DumpySquare

Same issue here - seeing "Not yet activated" in Runtime Status. I am behind a web gateway at work, so some of the background requests made at startup are failing. Example:

msg: 'refreshAtcReleasesInfo, was not able to fetch release info for do',
url: 'https://api.github.com/repos/F5Networks/f5-declarative-onboarding/releases'

j-zehnder avatar Jan 02 '24 18:01 j-zehnder