You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
┌──(kali㉿DESKTOP-JMN88CV)-[~/wwwroot]
└─$ uname -a
Linux DESKTOP-JMN88CV 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux
Running on a ssh-remote VS Code session.
Starting embedded MySQL Shell, using config dir '/home/kali/.mysqlsh-gui' ...
Please enter the single instance token:
13:27:41.196550 INFO: Token read from STDIN
13:27:41.196589 INFO: Starting MySQL Shell GUI web server...
13:27:41.196665 INFO: Checking web server certificate...
13:27:41.198370 ERROR: Exception information:
Traceback (most recent call last):
- File "/home/kali/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.16.4/shell/lib/mysqlsh/plugins/gui_plugin/core/lib/certs/locations.py", line 721, in _get_installed_certs
- exit_code, output = lib.run_shell_cmd(cmd)
- ^^^^^^^^^^^^^^^^^^^^^^
- File "/home/kali/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.16.4/shell/lib/mysqlsh/plugins/gui_plugin/core/lib/SystemUtils.py", line 158, in run_shell_cmd
- stream = popen(cmd, cwd=cwd)
- ^^^^^^^^^^^^^^^^^^^
- File "/home/kali/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.16.4/shell/lib/mysqlsh/plugins/gui_plugin/core/lib/SystemUtils.py", line 187, in popen
- proc = subprocess.Popen(cmd,
- ^^^^^^^^^^^^^^^^^^^^^
- File "/home/kali/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.16.4/shell/lib/mysqlsh/lib/python3.12/subprocess.py", line 1026, in __init__
- self._execute_child(args, executable, preexec_fn, close_fds,
- File "/home/kali/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.16.4/shell/lib/mysqlsh/lib/python3.12/subprocess.py", line 1953, in _execute_child
- raise child_exception_type(errno_num, err_msg, err_filename)
-FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
13:27:41.198432 INFO: The installed certificate has errors: The certificate is not installed at WIN Certificate Store
13:27:41.198456 INFO: Certificate is not installed. Use gui.core.installShellWebCertificate() to install one.
Starting embedded MySQL Shell, using config dir '/home/kali/.mysqlsh-gui' ...
13:27:54.159543 ERROR: Exception information:
FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
13:27:54.490374 ERROR: Exception information:
FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
13:27:54.491105 ERROR: Exception information:
FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
true
The text was updated successfully, but these errors were encountered:
Alan3344
changed the title
WSL kali not work: 13:30:38.521676 ERROR: Exception information: FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
WSL2 Kali not work: 13:30:38.521676 ERROR: Exception information: FileNotFoundError: [Errno 2] No such file or directory: 'certutil.exe'
Oct 29, 2024
I wonder if the extension is getting confused because VSC is running on Windows. That is, if the extension detects it is running on Windows (host) and assuming that the install in WSL is also Windows (vs checking the WSL OS type and acting accordingly)
There are at least two issues I've found doing a quick scan of code:
At least on my system, python -m platform 'print(platform.system())' returns Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.39 and the code in Start.py is expecting the short, simple string of Linux. Perhaps all instances of this OS check should be changed as follows:
# fromifplatform.system() =="Linux":
# to ifplatform.system().startswith("Linux"):
In SystemUtils.py this if should maybe be changed in as similar way:
# fromiftype=="Linux":
# to iftype.startswith("Linux"):
There may be more appropriate ways to detect the OS, but this is one way to modify the code.
Once I made these changes and restarted VS Code and tried to run the Welcome Wizard, it finally popped up the certificate installation window and installed the certificate after answering the prompts.
A potential temporary workaround is to go to extension settings and turn off "Enforce HTTPS" until these bugs are fixed. I looked at trying to make a PR but it looks like a multi-step process just to get to the point of making a PR, let alone actually submitting it. Hopefully they'll give me credit in the changelog anyway.
As an overall code comment, IMO, all of the various system detection statements should be standardized in a single function vs repeated several times in code, so fixes like this only need to happen in one place.
Pulgins version:
MySQL Shell for VS Code 1.16.4+9.0.1 Preview
Freshly installed Kali Linux in WSL2
About vscode:
MySQL Shell for VS Code
error detailThe text was updated successfully, but these errors were encountered: