Closed sys-auditing closed 2 years ago
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-105-generic x86_64)
[31mERROR: [0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/root/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.1.2/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!
Hi, i'm getting this issue when trying to install the certificate.
Windows 10 vscode insiders WSL2
�[31mERROR: �[0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/home/user/.vscode-server-insiders/extensions/oracle.mysql-shell-for-vs-code-1.1.2-linux-x64/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!
Thank you
Would like to understand how are you getting to that error given you are installing on Windows but it seems it is trying to install the linux version of the extension (oracle.mysql-shell-for-vs-code-1.1.2-linux-x64), could you provide more details about how did you get there?.
Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-105-generic x86_64)
�[31mERROR: �[0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/root/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.1.2/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!
In Linux, the installation of the certificate creates an install script and tries to execute it using either gnome-terminal or xterm. If none of them are available you will get this error.
As a workaround you can execute the script in your terminal, it is located at: ~/.mysqlsh-gui/plugin_data/web_certs/install.sh
Once executed, restart VSCode (this is the equivalent to running the Setup Wizard)
The issue seems to be related that there is no xterm or gnome-terminal installed on your system. We are working to support more terminal apps - which one is available on your system?
In the meantime, please check the following directory ~/.mysqlsh-gui/plugin_data/gui_plugin/web_certs
.
There should be a install.sh
in that directory. If you run that in your terminal app, it should guide you through the certificate generation process.
After installing the certificate, please restart VS Code. Then the MySQL Shell for VS Code extension should work as expected.
Windows 11, WSL2 (Ubuntu), VSCode lastest (1.65.2)
[31mERROR: [0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/home/cognitom/.vscode-server/extensions/oracle.mysql-shell-for-vs-code-1.1.2/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!
I've run install.sh
manually and it said "Certificate has been installed successfully!" and restarted VS Code. But still I couldn't make any connection. Just black screen...
Thank you.
Hi @cognitom I've followed your instructions and confirmed the certificate was installed as required by running the script by hand, and I got to the same state.
A quick review did not lead me to any conclusion so we will have to investigate.
Would be good if you can help us submitting a bug report into our system, you can start it through the Extension itself:
@rennox sure. I'll try it.
I'm having the exact same problem, windows 10 + WSL2 Vscode fails to install the certificate and if I do it manually, then I just get a black screen
Hi Guys
Long story short: the missing piece to make the puzzle complete in WSL2 is to get the certificate also installed in Windows.
(We will work on resolving this problem)
In the meantime, if you want to solve the problem what you can do is:
Restart VSCode and try the extension.
Hi @rennox, i have tried your solution, but unfortunately not working. Instead i have a new issue after doing your steps, so when calling code-insiders .
command i'm getting this message error :
/home/user/.vscode-server-insiders/bin/95e8ecaa65bf2d790a4e3b586e843435fc5c0f77/bin/remote-cli/code-insiders: 12: /home/user/.vscode-server-insiders/bin/95e8ecaa65bf2d790a4e3b586e843435fc5c0f77/bin/node: not found
Thank you
Hi @sys-auditing not glad to see you got a new problem, but it seems totally unrelated as those steps just register a certificate in windows, to undo it you can do this:
My apologies, it totally unrelated, it coincides with vs code insiders update.
I just get a black screen, even a certificate successfully installed on my windows,
Thank you
Also having problems on MacOS. Getting the following error:
Could not register plugin object 'gui'. ERROR: dlopen(/Users/(my-user-name)/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.3-darwin-x64/shell/lib/mysqlsh/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so, 2): Symbol not found: __dyld_shared_cache_contains_path Referenced from: /Users/(my-user-name)/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.3-darwin-x64/shell/lib/mysqlsh/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so (which was built for Mac OS X 12.0) Expected in: /usr/lib/libSystem.B.dylib Could not register plugin object 'gui'. ERROR: dlopen(/Users/(my-user-name)/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.3-darwin-x64/shell/lib/mysqlsh/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so, 2): Symbol not found: __dyld_shared_cache_contains_path Referenced from: /Users/(my-user-name)/.vscode/extensions/oracle.mysql-shell-for-vs-code-1.1.3-darwin-x64/shell/lib/mysqlsh/lib/python3.10/lib-dynload/_ctypes.cpython-310-darwin.so (which was built for Mac OS X 12.0) Expected in: /usr/lib/libSystem.B.dylib
@benzdouglas Thanks for sharing, you are touching a sensitive point there! We are shipping a MySQL Shell binary that serves the MySQL feature set. That mysqlsh binary + dependencies like Python have to be targeting a specific macOS version (macOS 12 in our case) and only work back a limited number of macOS releases (macOS 11 + macOS 12). Based on the error it seems you are running an older version of macOS and therefore the mysqlsh binary does not work on your system.
To make this cleared I will do the following things.
I will also talk to our release engineering team and see if we can target an older version of macOS. Problem with that is we cannot use the more recent APIs and that would limit what we can do feature wise.
Do you have a specific reason for not upgrading to macOS 11? I have an old MacPro 3,1 running a patched version of macOS 10.15.6 myself where I could reproduce the issue. I plan to update it to macOS 12 with https://dortania.github.io/OpenCore-Legacy-Patcher/ once I have some spare time.
Do you have a specific reason for not upgrading to macOS 11?
Actually my reason is that I have one last application in 32bit mode - the last version of Adobe Lightroom that was not subscription based. Planning to transition all of my photography to an open source application so that I can make the transition, just haven't gotten around to it yet!
I look forward to the advancement of this extension as I have tried many different MySQL management extensions for VSCode and each of them have something not working or something I don't like about them.
@benzdouglas That's actually a very valid reason. I have switched from Adobe Illustrator, Photoshop and Indesign to the Affinity apps from Serif, but I still haven't found a proper replacement for Lightroom yet. I like RawTherapee but it misses "Collections" to organize thousands and thousands of photos correctly...
Please make sure to check our extension out once you have upgraded, would love to get your input. Thanks!
@mzinner I was heading towards using darktable, but I'll give RawTherapee a look! Thanks! And I'll definitely check back in on this extension. Currently using cweijan's extension since it seems the best (free) one, but as discovered yesterday (and thus my trying out this extension) it doesn't support running stored procedures.
@benzdouglas wow, thanks for pointing me to darktable. I just gave it a try and it is much, much more like Lightroom when compared to RawTherapee. Things are not as intuitive as in Lightroom (just spent 10 minutes with it) but I will take a closer look during the weekend and read the manual.
In windows10 x64, certificate is install but can't work.
@tench, we would like to find out what is wrong. Please confirm I understand the behaviour correctly.
Is that a correct description? It also does not change after closing and re-opening the VS Code app?
Could I ask you to do the following?
Msg debug
and change the log level to DEBUG3
.MySQL Shell for VS Code
in the dropdown on the right-hand side.This output would hopefully give us more hints on what is wrong.
Thanks so much!
Hi, i have tried your steps, and this is a debug log :
Starting embedded MySQL Shell, using config dir '/home/user/.mysqlsh-gui' ...
Please enter the single instance token:
11:8:9.203606 INFO: Token read from STDIN
11:8:9.203692 INFO: Starting MySQL Shell GUI web server...
11:8:9.203986 INFO: Checking web server certificate...
11:8:9.320189 DEBUG2: The certificate installation is inconsistent:
11:8:9.320372 DEBUG2: USER_HOME: /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt, [Installed: True, Valid: True]
11:8:9.568229 DEBUG2: WIN: WIN Certificate Store, [Installed: True, Valid: False, Reason: Certificate at WIN Certificate Store does not match the certificate at /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt]
11:8:9.636682 DEBUG2: CA_CERTS_FOLDER: /usr/local/share/ca-certificates/rootCA.crt, [Installed: True, Valid: False, Reason: Certificate at /usr/local/share/ca-certificates/rootCA.crt does not match the certificate at /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt]
11:8:9.636851 DEBUG2: SSL_CERTS: /etc/ssl/certs/rootCA.pem, [Installed: True, Valid: False, Reason: Certificate at /usr/local/share/ca-certificates/rootCA.crt is invalid]
11:8:9.646039 DEBUG2: NSS_DB: User NSS Database, [Installed: False, Valid: False, Reason: The certificate is not installed at User NSS Database]
11:8:9.649052 INFO: Certificate is not correctly installed. Use gui.core.installShellWebCertificate() to fix the installation.
Thank you
Hi @sys-auditing
After your initial report we improved the certificate installation logic to validate all the possible inconsistencies and to create a script to fix them all.
The way to fix it is to re-launch the Welcome wizard to install the certificate again, since you are using WSL, the script can not be executed automatically, you will get an error telling you to execute the install script on your own including the full path to the script to be executed (Originally this was that "UNABLE to find terminal" error).
The only thing you need to do is execute that script, and all the inconsistencies listed above should get fixed.
Please let us know if after executing the script you continue having troubles.
I have followed your notice @rennox
https://github.com/mysql/mysql-shell-plugins/issues/1#issuecomment-1084932962
and i got a black screen, even a certificate successfully installed on my windows,
Thank you
Hi @sys-auditing
Would you mind sharing again the debug log as you did in the past?
@mzinner no, just welcome->reload->welcome->reload..... unlimit cycle around. debug log: `Starting embedded MySQL Shell, using config dir 'C:\Users\TENBOOK\AppData\Roaming\MySQL\mysqlsh-gui' ... Please enter the single instance token: 21:8:21.224485 INFO: Token read from STDIN
21:8:21.556237 INFO: Starting MySQL Shell GUI web server...
21:8:21.557242 INFO: Checking web server certificate...
21:8:21.697607 DEBUG2: The certificate installation is inconsistent:
21:8:21.698608 DEBUG2: USER_HOME: C:\Users\TENBOOK\AppData\Roaming\MySQL\mysqlsh-gui\plugin_data\gui_plugin\web_certs\rootCA.crt, [Installed: True, Valid: True]
21:8:22.18127 DEBUG2: WIN: WIN Certificate Store, [Installed: False, Valid: False, Reason: The certificate is not installed at WIN Certificate Store]
21:8:22.118742 INFO: Certificate is not correctly installed. Use gui.core.installShellWebCertificate() to fix the installation.`
Hi @rennox,
by clicking on Restart the Internal MySQL Shell Process
, the debug log looks like :
Starting embedded MySQL Shell, using config dir '/home/user/.mysqlsh-gui' ...
Please enter the single instance token:
10:30:42.799335 INFO: Token read from STDIN
10:30:42.799431 INFO: Starting MySQL Shell GUI web server...
10:30:42.799794 INFO: Checking web server certificate...
10:30:42.879022 DEBUG2: The certificate installation is inconsistent:
10:30:42.879150 DEBUG2: USER_HOME: /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt, [Installed: True, Valid: True]
10:30:43.101681 DEBUG2: WIN: WIN Certificate Store, [Installed: True, Valid: False, Reason: Certificate at WIN Certificate Store does not match the certificate at /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt]
10:30:43.167549 DEBUG2: CA_CERTS_FOLDER: /usr/local/share/ca-certificates/rootCA.crt, [Installed: True, Valid: False, Reason: Certificate at /usr/local/share/ca-certificates/rootCA.crt does not match the certificate at /home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt]
10:30:43.167761 DEBUG2: SSL_CERTS: /etc/ssl/certs/rootCA.pem, [Installed: True, Valid: False, Reason: Certificate at /usr/local/share/ca-certificates/rootCA.crt is invalid]
10:30:43.176839 DEBUG2: NSS_DB: User NSS Database, [Installed: False, Valid: False, Reason: The certificate is not installed at User NSS Database]
10:30:43.179778 INFO: Certificate is not correctly installed. Use gui.core.installShellWebCertificate() to fix the installation.
The certificate successfully installed on my windows.
Thank you
Hi @tench, @sys-auditing
We are really trying to understand why you guys are having these troubles, in general the certificate installation is straight forward:
When the extension is launched, it will do a validation to make sure that the root certificate is installed at the user home folder, and that the same certificate is installed on the different required places.
When this does not happen, the log shows something like:
DEBUG2: The certificate installation is inconsistent:
DEBUG2: <list of required places including reason if the certificate installed there is valid or not>
INFO: Certificate is not correctly installed. Use gui.core.installShellWebCertificate() to fix the installation.
This last message is not something you actually need to execute, when this happens you will also get a popup window as:
Clicking on the "Run Welcome Wizard" will internally call gui.core.installShellWebCertificate() to fix the certificate installation.
Windows Case
Fixing the certificate should be straight forward once you start the Welcome Wizard, you hit "Next>" a couple of times and you will get a security warning about the certificate being installed:
Make sure you click on "Yes", because "No" is the default answer (if you just hit enter)
After that, the expectation is that reloading VSCode will confirm all is OK now.
WSL2 Case
This is a more complicated case, because fixing the certificate in all the different locations requires sudo access, so to achieve it, an install script is created to handle all the changes needed to fix the certificates in all places.
Now, there's yet another complication, with the terminal available on WSL, it is impossible to call such script automatically from the wizard, for that reason, after you click "Next>" a couple of times on the Welcome Wizard, you will get an error like this:
_ERROR: core.installShellWebCertificate: User-defined function threw an exception: Exception: Could not install the Shell GUI certificate. Please execute '/home/cooluser/.mysqlsh-gui/plugin_data/gui_plugin/webcerts/install.sh' to install it manually and restart Visual Studio Code.
What you need to do is open a linux terminal, and execute the install script as indicated on the message.
When the script is executed it will first provide a list of the fixes to be done with the script:
NOTE: the script is customized to perform exactly the operations needed to fix the certificates, so the list above is just an example, it could be different each case. There might be several security warnings (one for each operation to be done on the Windows Certificate Store) and sudo password requests as well.
Once completed, you can go back to the Welcome Wizard and hit "Next>" one more time, it will reload VSCode and again, expectation is that everything works as expected.
I hope this explanation gives more clarity and helps everybody identifying the piece that is not working, we want you guys to have a good experience with this extension and we really appreciate all the feedback you can provide to solve this.
@rennox
Still the same:
10:4:55.87056 INFO: Token read from STDIN
10:4:55.108917 INFO: Starting MySQL Shell GUI web server...
10:4:55.109915 INFO: Checking web server certificate...
10:4:55.243447 DEBUG2: The certificate installation is inconsistent:
10:4:55.243447 DEBUG2: USER_HOME: C:\Users\TENBOOK\AppData\Roaming\MySQL\mysqlsh-gui\plugin_data\gui_plugin\web_certs\rootCA.crt, [Installed: True, Valid: True]
10:4:55.585940 DEBUG2: WIN: WIN Certificate Store, [Installed: False, Valid: False, Reason: The certificate is not installed at WIN Certificate Store]
10:4:55.695321 INFO: Certificate is not correctly installed. Use gui.core.installShellWebCertificate() to fix the installation.
Hi @rennox,
when the script is executed it gave me this error :
/home/user/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/install.sh: line 32: certutil.exe: command not found Failed removing the certificate
Sorry for wasting your time.
Thanks
Hi @sys-auditing
By no means this is a waste of time, I appreciate your feedback! It seems we are reaching to some scenario we did not consider, let me explain:
So far, the install logic relies in 2 assumptions:
Number 2 above is about the user being able to execute Windows commands (like certutil.exe) even from the linux terminal.
Can you help me determining the validity of the assumptions by:
In both cases I get something like:
If you got the "command not found error" in both cases then it means the certutil.exe is not available at all. If you got the "command not found error" only in the linux terminal, then it means interoperatibility between Windows and WSL is disabled (https://docs.microsoft.com/en-us/windows/wsl/filesystems)
Workaround 1 Ensure certutil.exe available in Windows and that and Windows/WSL2 interoperatibility is enabled, then retry the certificate install.
Workaround 2 Copy the certificate from the linux home folder: ~/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/rootCA.crt to some place visible from the Windows explorer.
Open the certificate manager and make sure no MySQL Shell certificate is installed by removing anything called "MySQL Shell Auto Generated CA Certificate"
Go to the windows folder where you copied the certificate from linux and do right click/install
On the Certificate Import Wizard select "Current User" and Next and then install the certificate in the "Trusted Root Certification Authorities"
The important thing is to have you getting this installed, however, identifying the root cause of the failure installing will help us providing a better solution.
Hi @tench
First of all, thanks for the feedback.
In your case what is really strange, is that you give a sshot when I can see the certificate is installed, and even so the log indicates it is NOT installed:
10:4:55.585940 DEBUG2: WIN: WIN Certificate Store, [Installed: False, Valid: False, Reason: The certificate is not installed at WIN Certificate Store]
In your case that is pure Windows (no WSL2) the only assumption is that the certutil.exe is available in Windows, can you please verify that?
Assuming the state is as the sshot you provided (the certificate is installed), can you please execute the following command and provide the output:
certutil.exe -verifystore -user ROOT "MySQL Shell Auto Generated CA Certificate"
@rennox
ROOT "Trusted ROOT Certification Authorities" ================ Certificate 0 ================ Serial number: 6 d42f6acb7fc601aa150919d60bd0b4e1c23bf8b Issuer: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US NotBefore: 2022-04-26 18:01 NotAfter: 2032-04-24 18:01 CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US The signature matches the public key Root certificate: user matches issuer D6f906c7fc0a32b2d36280a3488075ebf0c89f certificate hash (sha1) : 93 No key provider information The decrypted certificate and private key could not be found. Authenticated issuing policies: All Validated application policies: all Certificate is valid CertUtil: -verifystore Command completed successfully.
@rennox
The certutil.exe is available in Windows and Windows/WSL2 interoperatibility is enabled also,
By pursuing the Workaround 2, i got an error after the second Next
step.
Error message is :
And automatically redirect to a new message :
After reloading the VS Code, the same issue persists.
Thank you
Hi @sys-auditing
I finally was able to reproduce the symptoms you describe, will work on a fix and keep you posted when it is available.
Again, thanks for all the feedback!
Same problem as others, except different environment. This extension appears not to be aware of/support https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack, itself a Preview ("what isn't a preview", is a better question.)
Where the Remote WSL2 project creates a WSL2 Docker (Docker inside WSL2, not Docker Desktop) Dev Container. When inside the Docker container, the install.sh
still tries to execute the Windows binary "certutil.exe". Of course it won't be accessible.
Why must we install a certificate in the first place?
Having the same issue here: DEBUG2: WIN: WIN Certificate Store, [Installed: False, Valid: False, Reason: The certificate is not installed at WIN Certificate Store]
Maybe there is a localization-problem?
The script is checking the certutil.exe result like this:
if line.startswith("================ Certificate"):
But i get the result in local language
ROOT "Vertrauenswürdige Stammzertifizierungsstellen"
================ Zertifikat 0 ================
Seriennummer: 6fde137c03704f03f0ed1b57cfb852f0f4026e2d
Aussteller: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
Nicht vor: 04.05.2022 12:39
Nicht nach: 02.05.2032 12:39
Antragsteller: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
Signatur stimmt mit dem öffentlichen Schlüssel überein.
Stammzertifikat: Antragsteller stimmt mit Aussteller überein
Zertifikathash(sha1): cc2530133b9fd3fd2aa87f1d1900b9f19962e9f1
Keine Informationen über den Schlüsselanbieter
Das Zertifikat und der private Schlüssel für die Entschlüsselung wurden nicht gefunden.
Verfizierte Ausstellungsrichtlinien: Alle
Verfizierte Anwendungsrichtlinien: Alle
Das Zertifikat ist gültig.
Why must we install a certificate in the first place?
The extension as well as any web view it launches create a secure connection to the MySQL Shell process, which serves as the backend for it (https and wss). For that we have to have a valid certificate in place. The challenge is that each platform handles that differently and we are still figuring out what to do to make it work for everybody. So please be patient and help us to get necessary details to fix all related issues. Thanks!
Hi Guys
A new version of the extension has been released being the main objective the resolution of certificate install issues.
@sys-auditing As I mentioned on my last reply, I was able to reproduce the problem you faced and this latest version is expected to fix the install issues in WSL.
@tench Your case is kind of rare (we have not seen issues installing the extension on windows so far), but on this latest version the logging was improved, so once the extension is installed (before the certificates are in place) you can go to Settings, search for mysql and set the log level to DEBUG3, then you can try installing the certificates, if the problem persist, sending the entire log from the output pane would be useful.
@wakee You spotted it right, this last version fixed the localization issue.
@westonNexben You are right we don't have this specific setup on the radar, considering WSL alone makes sense as it seems it is widely used, but Docker container inside WSL sounds like a corner case. The main goal for now is supporting OSX/Linux/Windows and based on feedback we are trying to include WSL, something else would have to be evaluated and eventually added if we find it worth the effort. The certificate is needed because of the architecture of the extension, which is a web frontend connecting to an http server running in the background, since we wanted to secure that communication, the certificate is required, and it is required in Windows (even running code from WSL) because of the VSCode architecture, it seems even started from WSL, the webcomponent uses certificates from the Windows Certificate Manager.
Thank you all for your feedback, great to improve the extension.
@rennox, after update, it can work. Thanks!
Hi @rennox,
thank you for your support.
The VS Code told me that the extension is updated, and when relaunching the welcome wizard and the debug log looks like :
Starting embedded MySQL Shell, using config dir '/home/USER/.mysqlsh-gui' ...
10:20:13.856312 DEBUG3: Executing System Command: which certutil
10:20:13.858460 DEBUG3: ---
/usr/bin/certutil
---
10:20:13.858698 DEBUG3: Executing Shell Command: certutil -d sql:/home/USER/.pki/nssdb -L
10:20:13.862362 DEBUG3: ---
certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.
---
10:20:13.862683 DEBUG3: Executing Shell Command: certutil.exe -verifystore -user ROOT MySQL Shell Auto Generated CA Certificate
10:20:13.929161 DEBUG3: ---
ROOT "Trusted Root Certification Authorities"
================ Certificate 0 ================
Serial Number: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Issuer: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
NotBefore: 31/03/2022 10:42
NotAfter: 29/03/2032 10:42
Subject: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
Signature matches Public Key
Root Certificate: Subject matches Issuer
Cert Hash(sha1): aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
No key provider information
Cannot find the certificate and private key for decryption.
Verified Issuance Policies: All
Verified Application Policies: All
Certificate is valid
CertUtil: -verifystore command completed successfully.
---
10:20:14.546189 DEBUG3: Executing Shell Command: certutil.exe -verifystore -user ROOT MySQL Shell Auto Generated CA Certificate
10:20:14.610247 DEBUG3: ---
ROOT "Trusted Root Certification Authorities"
================ Certificate 0 ================
Serial Number: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Issuer: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
NotBefore: 31/03/2022 10:42
NotAfter: 29/03/2032 10:42
Subject: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US
Signature matches Public Key
Root Certificate: Subject matches Issuer
Cert Hash(sha1): aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
No key provider information
Cannot find the certificate and private key for decryption.
Verified Issuance Policies: All
Verified Application Policies: All
Certificate is valid
CertUtil: -verifystore command completed successfully.
---
10:20:14.610948 DEBUG3: Executing System Command: which bash
10:20:14.613910 DEBUG3: ---
/usr/bin/bash
---
10:20:14.614401 DEBUG3: Executing System Command: chmod u+x /home/USER/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/install.sh
10:20:14.615740 DEBUG3: ---
---
10:20:14.615815 DEBUG3: Executing System Command: which gnome-terminal
10:20:14.635859 DEBUG3: ---
b''
---
10:20:14.635970 DEBUG3: Executing System Command: which xterm
10:20:14.653867 DEBUG3: ---
b''
---
10:20:14.653986 ERROR: Unable to locate supported terminal, tried: gnome-terminal, xterm.
ERROR: core.installShellWebCertificate: User-defined function threw an exception:
Exception: Could not install the Shell GUI certificate. Please execute '/home/USER/.mysqlsh-gui/plugin_data/gui_plugin/web_certs/install.sh' to install it manually.
Thank you
@sys-auditing the log looks correct to me, it's the log for the verification if the certificate is installed and it is not.
Unfortunately WSL does not come with a terminal we can use to launch the install and wait for it to complete/validate the result, that's why there you need to run the script manually.
Please execute the script as indicated and restart VSCode, let me know if it worked.
@rennox
i'm using Windows Terminal. I got this debug log :
Do you want to continue [Y/n] ? Y
ROOT "Trusted Root Certification Authorities"
Deleting Certificate 0: CN=MySQL Shell Auto Generated CA Certificate, E=support@mysql.com, OU=MySQL, O=Oracle, L=Austin, S=Texas, C=US:6069bb7eabc7c8cac11b7d27924545cb45752ae4
CertUtil: -delstore command completed successfully.
Removing the certificate copy at /usr/local/share/ca-certificates/rootCA.crt
[sudo] password for ettoini:
Updating the system certificates...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
ROOT "Trusted Root Certification Authorities"
Signature matches Public Key
Certificate "MySQL Shell Auto Generated CA Certificate" added to store.
CertUtil: -addstore command completed successfully.
Verifying existence of the NSS database...
The NSS database does not exist, creating it...
certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.
Failed initializing the NSS database
Press any key to continue...
Thanks
Hi @sys-auditing
We managed to simplify the certificate installation in WSL, a new version (1.2.2) has been published.
This time, the certificate installation will be done directly from the Welcome Wizard, this is, no need for external script execution.
Please give it a try and let me know if this time finally you got it working.
Thanks for all the feedback provided so far!
Hi @rennox,
well done, finally i got it working.
Thank you :)
I'm still having this same issue on the latest version. Anyway to fix it when vscode is lunched in a .devcontenair created with docker? It does work when opening a local workspace.
@poidstotal i was getting this error
`2022-09-29 21:18:51: Error: [MSG] Exception information: Traceback (most recent call last):
I changed my windows to english, and..... worked
I'm having the same problem in Github Codespaces. The certificates is there in "/home/codespace/.mysqlsh-gui/plugin_data/gui_plugin/web_certs". Yet I can't create any connection.
Hi, i'm getting this issue when trying to install the certificate.
Windows 10 vscode insiders WSL2
[31mERROR: [0mcore.installShellWebCertificate: User-defined function threw an exception: Traceback (most recent call last): File "/home/user/.vscode-server-insiders/extensions/oracle.mysql-shell-for-vs-code-1.1.2-linux-x64/shell/lib/mysqlsh/plugins/gui_plugin/core/Certificates.py", line 159, in install_shell_web_certificate raise SystemError("UNABLE to find terminal!") SystemError: UNABLE to find terminal!
Thank you