Skip to content

Initializing the extension failed #772

@hching1

Description

@hching1

Description:

Installed VS Code Version 1.105.1 and added 'Test My Code' Version 3.5.0 extension. The extension is successfully installed but fails to initialise:

Failed to initialize tmc-langs: fetch failed: Error: unable to get local issuer certificate. Stack trace: TypeError: fetch failed at e.exports.fetch (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:418751) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async t.downloadFile (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:537588) at async c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:243966
This error may be caused by a proxy or firewall that is blocking network requests or by an antivirus program. This may also be caused by an antivirus program. You can try to resolve this issue by adding an exception to the directory at

Steps to reproduce the behavior:

  1. Open 'VS Code'
  2. Click on 'TMC' extension
  3. See error
  • OS: Windows 11
  • VSCode Version 1.105.1
  • TMC Extension Version 3.5.0

TMC Extension logs:

[2025-10-29 09:19:18:803] [INFO] Starting moocfi.test-my-code in "production" mode.
[2025-10-29 09:19:18:803] [INFO] Visual Studio Code version: 1.105.1
[2025-10-29 09:19:18:803] [INFO] moocfi.test-my-code version: 3.5.0
[2025-10-29 09:19:18:803] [INFO] Currently open workspace: undefined
[2025-10-29 09:19:18:803] [INFO] Platform win32 Arch x64
[2025-10-29 09:19:18:803] [INFO] TMC-Langs version: tmc-langs-cli-x86_64-pc-windows-msvc-0.39.1.exe
[2025-10-29 09:19:18:806] [INFO] Downloading TMC-langs from https://download.mooc.fi/tmc-langs-rust/tmc-langs-cli-x86_64-pc-windows-msvc-0.39.1.exe to temporary file c:\Users\HEC1\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli\temp-tmc-langs-cli-x86_64-pc-windows-msvc-0.39.1.exe
[2025-10-29 09:19:18:880] [ERROR] TypeError: fetch failed. Error: unable to get local issuer certificate.

TypeError: fetch failed
at e.exports.fetch (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:418751)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async t.downloadFile (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:537588)
at async c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:243966

[2025-10-29 09:19:18:880] [ERROR] An error occurred while downloading TMC-langs:
Connection Error: fetch failed. Caused by: {Error: unable to get local issuer certificate.

Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:519:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12)
}.

TypeError: fetch failed
at e.exports.fetch (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:418751)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async t.downloadFile (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:537588)
at async c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:243966

[2025-10-29 09:19:18:881] [ERROR] Initialization error during tmc-langs setup:
Connection Error: fetch failed. Caused by: {Error: unable to get local issuer certificate.

Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:519:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12)
}.

TypeError: fetch failed
at e.exports.fetch (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:418751)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async t.downloadFile (c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:537588)
at async c:\Users\HEC1.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:243966

If this issue is not resolved, the extension may not function properly.
[2025-10-29 09:19:18:881] [WARN] Could not check login status
[2025-10-29 09:19:18:883] [WARN] Skipped data migration
[2025-10-29 09:19:18:883] [WARN] Skipped tmc data directory check
[2025-10-29 09:19:18:884] [WARN] Skipped login command setup
[2025-10-29 09:19:18:885] [WARN] Failed to set initial exercises.
Error: Extension was not initialized properly.
[2025-10-29 09:32:25:824] [INFO] Posting a message to webview
{
"type": "setPanel",
"target": {
"id": 0,
"type": "App"
},
"panel": {
"id": 24914858,
"type": "InitializationErrorHelp"
}
}
[2025-10-29 09:32:25:995] [INFO] Posting message(s) to webview
[
{
"type": "initializationErrors",
"target": {
"id": 24914858,
"type": "InitializationErrorHelp"
},
"cliFolder": "c:\Users\HEC1\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli",
"initializationErrors": {
"tmc": {
"error": "fetch failed: Error: unable to get local issuer certificate",
"stack": "TypeError: fetch failed\n\tat e.exports.fetch (c:\Users\HEC1\.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:418751)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n\tat async t.downloadFile (c:\Users\HEC1\.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:537588)\n\tat async c:\Users\HEC1\.vscode\extensions\moocfi.test-my-code-3.5.0\dist\lib.js:2:243966"
},
"userData": null,
"workspaceManager": null,
"resources": null,
"exerciseDecorationProvider": null
}
}
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions