Bug #115993 MySQL Workbench Error when checking for updates https
Submitted: 3 Sep 18:33 Modified: 4 Sep 12:38
Reporter: Octavian Stolnicu Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.38 OS:Windows
Assigned to: CPU Architecture:Any
Tags: https, isAlive, UPDATE

[3 Sep 18:33] Octavian Stolnicu
Description:
Clicking the Help -> "Check for Updates" option in Workbench menu shows error.

This has been happening for a lot of versions and devs don't seem interested in fixing it...

Error shown is : 
AttributeError: 'CheckForUpdateThread' object has no attribute 'isAlive'

This can be fixed using instruction from comment [23 Aug 4:30] Martin Parody :
- edit the file C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\wb_utils_grt.py and update function checkForUpdatesCallback() - replace self.isAlive() with self.is_alive() (line approx 726)

Restarting Workbench and checking for updates again shows https error:
urllib.error.URLError: <urlopen error unknown url type: https>

This happens because the URL used to check latest version is 'http://workbench.mysql.com/current-release', which now redirects to 'https://workbench.mysql.com/current-release'

The python version included in Workbench does not have the ssl module included, so it is unable to connect to the https website.

Manual fix (Windows):

- check if this applies to you by trying to import ssl module in the included python version
     - run terminal command: C:\"Program Files"\MySQL\"MySQL Workbench 8.0 CE"\python.exe
     - type in Python console and press Enter: import ssl
     - I got error message: 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\python\Lib\ssl.py", line 100, in <module>
    import _ssl             # if we can't import it, let the error propagate
    ^^^^^^^^^^^
ImportError: DLL load failed while importing _ssl: The specified module could not be found.

     - exit Python console by typing "quit()" or Ctrl+Z and then press Enter

- check included Python version by running terminal command:
    - C:\"Program Files"\MySQL\"MySQL Workbench 8.0 CE"\python.exe --version
(for Workbench 8.0.38, the Python version is 3.12.2)

- locate and download the Python "Windows embeddable package" for your CPU (mine is 64-bit)
    - find it here: https://www.python.org/downloads/windows/
    - for Python 3.12.2, the download link is https://www.python.org/ftp/python/3.12.2/python-3.12.2-embed-amd64.zip
    - version 3.12.2 was not in the list, but I copied and modified the link for version Python 3.12.3

- extract the contents of the downloaded zip  (for version 3.12.2 it is called  python-3.12.2-embed-amd64.zip)

- paste all the files from the zip to  C:\"Program Files"\MySQL\"MySQL Workbench 8.0 CE" (make sure to close Workbench and any Python consoles that you might have started from that location, otherwise you will get error about folder/files being used)

- check that ssl module can now be imported:
     - run terminal command: C:\"Program Files"\MySQL\"MySQL Workbench 8.0 CE"\python.exe
     - type in Python console and press Enter: import ssl
     - no longer getting error message
     - exit Python console by typing "quit()" or Ctrl+Z and then press Enter

- open Workbench and update 
     - Now getting no update available message

Hope this helps somebody out there.

How to repeat:
Click Help -> "Check for Updates"

Suggested fix:
Import ssl module
[3 Sep 18:34] Octavian Stolnicu
isAlive fix is from bug https://bugs.mysql.com/bug.php?id=111874
[3 Sep 18:41] Octavian Stolnicu
Updated tags to be comma separated
[3 Sep 18:47] Octavian Stolnicu
isAlive bug main thread, the one above might get closed since it is a duplicate. Fix for isAlive is listed there as well by same user.
[3 Sep 18:47] Octavian Stolnicu
https://bugs.mysql.com/bug.php?id=110786
[4 Sep 5:35] MySQL Verification Team
Hello Octavian Stolnicu,

Thank you for the bug report.
Imho this is duplicate of Bug #110786, please see Bug #110786.

Regards,
Umesh
[4 Sep 9:14] Octavian Stolnicu
Hi Umesh,
My bug is partly related to that bug (I had already linked to the bug you mentioned), but after using the fix suggested by a comment from that bug I get another issue regarding HTTPS, which I did not find mentioned anywhere.

That is why my bug title mentions https and not isAlive.

Regards,
Octavian
[4 Sep 9:17] Octavian Stolnicu
Hi Umesh,

You've marked this bug as a duplicate, but, like I mentioned above, it is not.
I only mention the bug you referenced.

My bug is about HTTPS connection to check for update.

Kind regards,
Octavian
[4 Sep 10:22] MySQL Verification Team
Hello!

Thank you for your feedback.
This issue is already known(if you see in Bug #110786, many bugs are are marked as a duplicate), even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, I request you to  add your comments to the original bug instead. Thank you once again.

regards,
Umesh
[4 Sep 12:38] Octavian Stolnicu
Hello!
Thank you for your feedback.

I will not be commenting on other issues, even if you request it.

Cheers