API request failed - Error: certificate has expired
Workaround (read this first)
It seems that Let's Encrypt certificate is getting "wrongly" classified as expired. What helps for most people is to disable the use of system certificates in VS Code #245 (comment 693029948)
Looking for some insight on this issue.
I have previously connected successfully to our self-hosted GitLab instance from VS Code but now I get the error in the title. I am not sure what to make of this. I am able to connect to the GitLab instance via a browser without issue, but nothing works in VS. Note I have set gitlab.instanceUrl in the settings and generated and provided a PAT (again, I have previously been successful), and I even generated a new PAT to see if that helped, but nothing seems to work now.
Here are some full logs:
{
"message": "API request failed when trying to get current project because: Error: certificate has expired",
"stack": [
"Error: API request failed when trying to get current project because: Error: certificate has expired",
"\tat Object.fetchCurrentProject (d:\\Users\\ngutschow\\.vscode\\extensions\\gitlab.gitlab-workflow-3.3.0\\src\\gitlab_service.js:164:11)",
"\tat async DataProvider.getChildren (d:\\Users\\ngutschow\\.vscode\\extensions\\gitlab.gitlab-workflow-3.3.0\\src\\data_providers\\current_branch.js:98:22)",
"\tat async g.fetchChildrenNodes (d:\\Users\\ngutschow\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\out\\vs\\workbench\\services\\extensions\\node\\extensionHostProcess.js:670:681)"
]
}
Cannot read property 'uri' of undefined
TypeError: Cannot read property 'uri' of undefined
at refreshPipeline (d:\Users\ngutschow\.vscode\extensions\gitlab.gitlab-workflow-3.3.0\src\status_bar.js:55:79)
at Timeout._onTimeout (d:\Users\ngutschow\.vscode\extensions\gitlab.gitlab-workflow-3.3.0\src\status_bar.js:124:5)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
Cannot read property 'uri' of undefined
TypeError: Cannot read property 'uri' of undefined
at fetchBranchMR (d:\Users\ngutschow\.vscode\extensions\gitlab.gitlab-workflow-3.3.0\src\status_bar.js:149:79)
at Timeout._onTimeout (d:\Users\ngutschow\.vscode\extensions\gitlab.gitlab-workflow-3.3.0\src\status_bar.js:188:5)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
Edited by Tomas Vik