f5devcentral / vscode-f5

Let the F5 VSCode extension supercharge your workflows with schema validation, rest client, fast templates, and so much more!!!
https://f5devcentral.github.io/vscode-f5/#/
Apache License 2.0
57 stars 14 forks source link

[BUG] Error running command f5.addHost on machine without internet access #239

Closed ThBaumann-ladit closed 7 months ago

ThBaumann-ladit commented 10 months ago

With regard to the bug "[BUG] Error running command f5.addHost: command 'f5.addHost' not found. #206", I was able to determine the following problem:

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!

DumpySquare commented 10 months ago

Thanks for opening this. I can see code and tests that should cover for this situation. Can you provide the vscode-f5 logs from the OUTPUT window within vscode?

ThBaumann-ladit commented 10 months ago

I hope this is the desired output:

1 [2023-11-09T11:02:08.374Z] [INFO]: Extension/Host details: { name: 'vscode-f5', displayName: 'The F5 Extension', publisher: 'F5DevCentral', description: 'Supercharge your F5 automation development', version: '3.15.1', license: 'Apache-2.0', repository: 'https://github.com/f5devcentral/vscode-f5.git', host: '{"hostOS":"Windows_NT","platform":"win32","release":"10.0.19045"}', userInfo: '{"uid":-1,"gid":-1,"username":"xxx","homedir":"C:\\\\Users\\\\xxx","shell":null}' } 2 [2023-11-09T11:02:08.375Z] [ERROR]: no atc release version metadata found at atcVersions.json 3 [2023-11-09T11:02:08.375Z] [INFO]: atc release version has NOT been checked today, refreshing cache now 4 [2023-11-09T11:02:08.376Z] [INFO]: HTTPS-REQU [7lyq]: get -> https://api.github.com/repos/F5Networks/f5-appsvcs-templates/releases 5 [2023-11-09T11:02:08.376Z] [INFO]: HTTPS-REQU [8b2y]: get -> https://api.github.com/repos/F5Networks/f5-appsvcs-extension/releases 6 [2023-11-09T11:02:08.376Z] [INFO]: HTTPS-REQU [sksw]: get -> https://api.github.com/repos/F5Networks/f5-declarative-onboarding/releases 7 [2023-11-09T11:02:08.376Z] [INFO]: HTTPS-REQU [p87g]: get -> https://api.github.com/repos/F5Networks/f5-telemetry-streaming/releases 8 [2023-11-09T11:02:08.376Z] [INFO]: HTTPS-REQU [8uc3]: get -> https://api.github.com/repos/F5Networks/f5-cloud-failover-extension/releases 9 [2023-11-09T11:02:08.382Z] [INFO]: ------ Environment Variables ------ 10 [2023-11-09T11:02:08.382Z] [INFO]: F5_CONX_CORE_CACHE=c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\cache 11 [2023-11-09T11:02:08.382Z] [INFO]: F5_CONX_CORE_EXT_HTTP_AGENT=vscode-f5/3.15.1 12 [2023-11-09T11:02:08.382Z] [INFO]: F5_CONX_CORE_REJECT_UNAUTORIZED=false 13 [2023-11-09T11:02:08.382Z] [INFO]: F5_TELEMETRY_DEBUG=yes 14 [2023-11-09T11:02:08.382Z] [INFO]: F5_VSCODE_LOG_LEVEL=INFO 15 [2023-11-09T11:02:08.382Z] [INFO]: F5_VSCODE_TEEM=false 16 [2023-11-09T11:02:08.386Z] [INFO]: ------ Environment Variables ------ 17 [2023-11-09T11:02:08.386Z] [INFO]: F5_CONX_CORE_CACHE=c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\cache 18 [2023-11-09T11:02:08.386Z] [INFO]: F5_CONX_CORE_EXT_HTTP_AGENT=vscode-f5/3.15.1 19 [2023-11-09T11:02:08.386Z] [INFO]: F5_CONX_CORE_REJECT_UNAUTORIZED=false 20 [2023-11-09T11:02:08.386Z] [INFO]: F5_TELEMETRY_DEBUG=yes 21 [2023-11-09T11:02:08.386Z] [INFO]: F5_VSCODE_LOG_LEVEL=INFO 22 [2023-11-09T11:02:08.386Z] [INFO]: F5_VSCODE_TEEM=false 23 [2023-11-09T11:02:08.388Z] [INFO]: ------ Environment Variables ------ 24 [2023-11-09T11:02:08.388Z] [INFO]: F5_CONX_CORE_CACHE=c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\cache 25 [2023-11-09T11:02:08.388Z] [INFO]: F5_CONX_CORE_EXT_HTTP_AGENT=vscode-f5/3.15.1 26 [2023-11-09T11:02:08.388Z] [INFO]: F5_CONX_CORE_REJECT_UNAUTORIZED=false 27 [2023-11-09T11:02:08.388Z] [INFO]: F5_TELEMETRY_DEBUG=yes 28 [2023-11-09T11:02:08.388Z] [INFO]: F5_VSCODE_LOG_LEVEL=INFO 29 [2023-11-09T11:02:08.388Z] [INFO]: F5_VSCODE_TEEM=false 30 [2023-11-09T11:02:08.463Z] [ERROR]: { message: 'EXTERNAL-HTTPS-REQUEST-FAILED', path: undefined, err: 'Client network socket disconnected before secure TLS connection was established' } 31 [2023-11-09T11:02:08.468Z] [ERROR]: { msg: 'refreshAtcReleasesInfo, was not able to fetch release info for cf', url: 'https://api.github.com/repos/F5Networks/f5-cloud-failover-extension/releases', resp: [AxiosError: Client network socket disconnected before secure TLS connection was established at AxiosError.from (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\node_modules\axios\dist\node\axios.cjs:836:14) at RedirectableRequest.handleRequestError (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\f5-conx-core\node_modules\axios\dist\node\axios.cjs:3010:25) at RedirectableRequest.emit (node:events:513:28) at eventHandlers.<computed> (c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.15.1\node_modules\follow-redirects\index.js:14:24) at ClientRequest.emit (node:events:525:35) at TLSSocket.socketErrorListener (node:_http_client:502:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] { localAddress: undefined, port: 443, host: 'api.github.com', path: null, code: 'ECONNRESET', ...

cause: [Error: Client network socket disconnected before secure TLS connection was established at connResetException (node:internal/errors:717:14) at TLSSocket.onConnectEnd (node:_tls_wrap:1598:19) at TLSSocket.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] { code: 'ECONNRESET', path: null, host: 'api.github.com', port: 443, localAddress: undefined } } }

DumpySquare commented 10 months ago

That does help. Thank you. The following log indicates the original atc version cache is not there. It is bundled with the extension, so I recommend you delete and reinstall the extension

[2023-11-09T11:02:08.375Z] [ERROR]: no atc release version metadata found at atcVersions.json

ThBaumann-ladit commented 10 months ago

I have already tried this - unfortunately without success. I also cleaned up all temporary data: %APPDATA%\Code and %USERPROFILE%.vscode

As I said, the problem only occurs on the machine without Internet access.

DumpySquare commented 10 months ago

ok. thank you. I'll keep digging

ThBaumann-ladit commented 10 months ago

Thank you!

If you would like me to provide more logs or information, please let me know. (the output from above was actually only part of the total output).

ThBaumann-ladit commented 9 months ago

Hello, are there any news on this yet?

Best Regards Thomas

DumpySquare commented 9 months ago

Hi @ThBaumann-ladit, sorry for the delay. The things have been on hold for the holidays. I made good progress last time I looked at this. Hoping to work out a solution soon.

DumpySquare commented 7 months ago

just pushed v3.16.0 that has changes that should fix this. please check it out and confirm. Sorry for the wait.

ThBaumann-ladit commented 7 months ago

Hi @DumpySquare ,

Thank you very much - as far as I can tell, the extension is now working. The original problem that appeared when adding a host has been fixed.

However, I have noticed that during the installation via vsix-file some error messages appear which are also due to missing internet access. Obviously this has no effect on the functionality.


1 [2024-02-12T06:25:51.109Z] [INFO]: Extension/Host details:  {
  name: 'vscode-f5',
  displayName: 'The F5 Extension',
  publisher: 'F5DevCentral',
  description: 'Supercharge your F5 automation development',
  version: '3.16.0',
  license: 'Apache-2.0',
  repository: 'https://github.com/f5devcentral/vscode-f5.git',
  host: '{"hostOS":"Windows_NT","platform":"win32","release":"10.0.19045"}',
  userInfo: '{"uid":-1,"gid":-1,"username":"xxx","homedir":"C:\\\\Users\\\\xxx","shell":null}'
}
2 [2024-02-12T06:25:51.110Z] [ERROR]: no atc release version metadata found at c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.16.0\cache\atcVersions.json
3 [2024-02-12T06:25:51.111Z] [INFO]: atc release version has NOT been checked today, refreshing cache now
4 [2024-02-12T06:25:51.112Z] [INFO]: ------ Environment Variables ------
5 [2024-02-12T06:25:51.112Z] [INFO]: F5_CONX_CORE_CACHE=c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.16.0\cache
6 [2024-02-12T06:25:51.112Z] [INFO]: F5_CONX_CORE_EXT_HTTP_AGENT=vscode-f5/3.16.0
7 [2024-02-12T06:25:51.112Z] [INFO]: F5_CONX_CORE_REJECT_UNAUTORIZED=false
8 [2024-02-12T06:25:51.112Z] [INFO]: F5_TELEMETRY_DEBUG=yes
9 [2024-02-12T06:25:51.112Z] [INFO]: F5_VSCODE_LOG_LEVEL=INFO
10 [2024-02-12T06:25:51.112Z] [INFO]: F5_VSCODE_TEEM=false
11 [2024-02-12T06:25:51.112Z] [INFO]: HTTPS-REQU [zdch]: get -> https://api.github.com/repos/F5Networks/f5-appsvcs-templates/releases
12 [2024-02-12T06:25:51.112Z] [INFO]: HTTPS-REQU [nrox]: get -> https://api.github.com/repos/F5Networks/f5-appsvcs-extension/releases
13 [2024-02-12T06:25:51.112Z] [INFO]: HTTPS-REQU [jz3t]: get -> https://api.github.com/repos/F5Networks/f5-declarative-onboarding/releases
14 [2024-02-12T06:25:51.112Z] [INFO]: HTTPS-REQU [s7hd]: get -> https://api.github.com/repos/F5Networks/f5-telemetry-streaming/releases
15 [2024-02-12T06:25:51.112Z] [INFO]: HTTPS-REQU [04cv]: get -> https://api.github.com/repos/F5Networks/f5-cloud-failover-extension/releases
16 [2024-02-12T06:25:51.114Z] [INFO]: loading tmos -> xc rules file
17 [2024-02-12T06:25:51.180Z] [ERROR]: {
  message: 'EXTERNAL-HTTPS-REQUEST-FAILED',
  path: undefined,
  err: 'Client network socket disconnected before secure TLS connection was established'
}
18 [2024-02-12T06:25:51.181Z] [ERROR]: {
  msg: 'refreshAtcReleasesInfo, was not able to fetch release info for as3',
  url: 'https://api.github.com/repos/F5Networks/f5-appsvcs-extension/releases',
  resp: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '\tat AxiosError.from (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:837:14)\n' +
    '\tat RedirectableRequest.handleRequestError (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3087:25)\n' +
    '\tat RedirectableRequest.emit (node:events:513:28)\n' +
    '\tat eventHandlers.<computed> (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\follow-redirects\\index.js:38:24)\n' +
    '\tat ClientRequest.emit (node:events:525:35)\n' +
    '\tat TLSSocket.socketErrorListener (node:_http_client:502:9)\n' +
    '\tat TLSSocket.emit (node:events:513:28)\n' +
    '\tat emitErrorNT (node:internal/streams/destroy:151:8)\n' +
    '\tat emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
    '\tat Axios.request (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3877:41)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
19 [2024-02-12T06:25:51.181Z] [ERROR]: {
  message: 'EXTERNAL-HTTPS-REQUEST-FAILED',
  path: undefined,
  err: 'Client network socket disconnected before secure TLS connection was established'
}
20 [2024-02-12T06:25:51.181Z] [ERROR]: {
  msg: 'refreshAtcReleasesInfo, was not able to fetch release info for do',
  url: 'https://api.github.com/repos/F5Networks/f5-declarative-onboarding/releases',
  resp: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '\tat AxiosError.from (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:837:14)\n' +
    '\tat RedirectableRequest.handleRequestError (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3087:25)\n' +
    '\tat RedirectableRequest.emit (node:events:513:28)\n' +
    '\tat eventHandlers.<computed> (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\follow-redirects\\index.js:38:24)\n' +
    '\tat ClientRequest.emit (node:events:525:35)\n' +
    '\tat TLSSocket.socketErrorListener (node:_http_client:502:9)\n' +
    '\tat TLSSocket.emit (node:events:513:28)\n' +
    '\tat emitErrorNT (node:internal/streams/destroy:151:8)\n' +
    '\tat emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
    '\tat Axios.request (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3877:41)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
21 [2024-02-12T06:25:51.182Z] [ERROR]: {
  message: 'EXTERNAL-HTTPS-REQUEST-FAILED',
  path: undefined,
  err: 'Client network socket disconnected before secure TLS connection was established'
}
22 [2024-02-12T06:25:51.182Z] [ERROR]: {
  msg: 'refreshAtcReleasesInfo, was not able to fetch release info for cf',
  url: 'https://api.github.com/repos/F5Networks/f5-cloud-failover-extension/releases',
  resp: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '\tat AxiosError.from (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:837:14)\n' +
    '\tat RedirectableRequest.handleRequestError (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3087:25)\n' +
    '\tat RedirectableRequest.emit (node:events:513:28)\n' +
    '\tat eventHandlers.<computed> (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\follow-redirects\\index.js:38:24)\n' +
    '\tat ClientRequest.emit (node:events:525:35)\n' +
    '\tat TLSSocket.socketErrorListener (node:_http_client:502:9)\n' +
    '\tat TLSSocket.emit (node:events:513:28)\n' +
    '\tat emitErrorNT (node:internal/streams/destroy:151:8)\n' +
    '\tat emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
    '\tat Axios.request (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3877:41)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
23 [2024-02-12T06:25:51.182Z] [ERROR]: {
  message: 'EXTERNAL-HTTPS-REQUEST-FAILED',
  path: undefined,
  err: 'Client network socket disconnected before secure TLS connection was established'
}
24 [2024-02-12T06:25:51.182Z] [ERROR]: {
  msg: 'refreshAtcReleasesInfo, was not able to fetch release info for fast',
  url: 'https://api.github.com/repos/F5Networks/f5-appsvcs-templates/releases',
  resp: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '\tat AxiosError.from (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:837:14)\n' +
    '\tat RedirectableRequest.handleRequestError (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3087:25)\n' +
    '\tat RedirectableRequest.emit (node:events:513:28)\n' +
    '\tat eventHandlers.<computed> (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\follow-redirects\\index.js:38:24)\n' +
    '\tat ClientRequest.emit (node:events:525:35)\n' +
    '\tat TLSSocket.socketErrorListener (node:_http_client:502:9)\n' +
    '\tat TLSSocket.emit (node:events:513:28)\n' +
    '\tat emitErrorNT (node:internal/streams/destroy:151:8)\n' +
    '\tat emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
    '\tat Axios.request (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3877:41)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
25 [2024-02-12T06:25:51.183Z] [ERROR]: {
  message: 'EXTERNAL-HTTPS-REQUEST-FAILED',
  path: undefined,
  err: 'Client network socket disconnected before secure TLS connection was established'
}
26 [2024-02-12T06:25:51.183Z] [ERROR]: {
  msg: 'refreshAtcReleasesInfo, was not able to fetch release info for ts',
  url: 'https://api.github.com/repos/F5Networks/f5-telemetry-streaming/releases',
  resp: 'Error: Client network socket disconnected before secure TLS connection was established\n' +
    '\tat AxiosError.from (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:837:14)\n' +
    '\tat RedirectableRequest.handleRequestError (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3087:25)\n' +
    '\tat RedirectableRequest.emit (node:events:513:28)\n' +
    '\tat eventHandlers.<computed> (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\follow-redirects\\index.js:38:24)\n' +
    '\tat ClientRequest.emit (node:events:525:35)\n' +
    '\tat TLSSocket.socketErrorListener (node:_http_client:502:9)\n' +
    '\tat TLSSocket.emit (node:events:513:28)\n' +
    '\tat emitErrorNT (node:internal/streams/destroy:151:8)\n' +
    '\tat emitErrorCloseNT (node:internal/streams/destroy:116:3)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n' +
    '\tat Axios.request (c:\\Users\\xxx\\.vscode\\extensions\\f5devcentral.vscode-f5-3.16.0\\node_modules\\f5-conx-core\\node_modules\\axios\\dist\\node\\axios.cjs:3877:41)\n' +
    '\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}
27 [2024-02-12T06:25:51.183Z] [INFO]: saving atc versions cache to c:\Users\xxx\.vscode\extensions\f5devcentral.vscode-f5-3.16.0\cache\atcVersions.json
``
DumpySquare commented 7 months ago

Cool. Thanks. Those errors are related to the lack of internet connectivity (although I can probably clean them up a bit). The recent changes/fix just prevented those errors from causing any further issues with the program. I'm glad it's working now. Thanks for the github issue.