[?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by chrisb »

I finally found the culprit: If I change line 43 in addonmanager_utilities.py from

Code: Select all

        ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
to

Code: Select all

        ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
AddonManager shows the list of workbenches again.

I don't understand the implications, so I don't know what to do. Should I create a pull request?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by looo »

chrisb wrote: Mon Feb 03, 2020 10:35 pm I finally found the culprit
nice! I tested with windows and linux and the addon-manager works for both with the mentioned change. So please go ahead and create a PR.

Maybe apply the change only for py3.8.

Code: Select all

if sys.version_info.major >= 3 and sys.version_info.minor >= 8:
    ssl_ctx = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
else:
    ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by easyw-fc »

@chrisb is asking if this would change something about how the SSL is handled... it seems client certificates don't encipt data...
No encryption of data takes place in case of Client certificates.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by looo »

easyw-fc wrote: Tue Feb 04, 2020 11:12 am @chrisb is asking if this would change something about how the SSL is handled... it seems client certificates don't encipt data...
No encryption of data takes place in case of Client certificates.
And this s a problem?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by easyw-fc »

looo wrote: Tue Feb 04, 2020 11:44 am And this s a problem?
in terms of privacy yes...
moreover we should discover why the server side option is working on Win and Linux but not on OSX...
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by chrisb »

Can I do something to narrow this down?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by looo »

chrisb wrote: Tue Feb 04, 2020 1:22 pm Can I do something to narrow this down?
[/quote

Maybe trying to reproduce the error directly with a conda-environment (not the bundle).
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by easyw-fc »

this is reminding me an issue I had with AppImage which is now solved ... this is not instead solved on OSX bundle
We failed to reach a server.
Reason: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
EDIT:
https://forum.freecadweb.org/viewtopic. ... 20#p327416
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by chrisb »

looo wrote: Tue Feb 04, 2020 10:45 am Maybe apply the change only for py3.8.
It seems to be rather a MacOS issue than a Python 3.8 one. It seems that Apple has stopped supporting openSSL. It needs to be compiled which needs to install at least some xcode packages ...
I would prefer to make the distinction which authentication to use depend on the OS.

I could use one of these:
platform.system() which is on my system 'Darwin'
sys.platform which is on my system 'darwin'
platform.platform() which is on my system 'macOS-10.13.2-x86_64-i386-64bit'; I would use the first 5 characters for comparison.

Which one is the right way to go? Or should I use something else?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [?BUG] Addon Manager hangs in 0.19 on MacOS and possibly related issues.

Post by triplus »

That is i guess one of the cons of using the latest versions of software, as you get to fix the new bugs. ;)
Post Reply