-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS build with SSL problems #4514
Comments
same here. I am on intel mac: mportError: dlopen(/Applications/diogenesaibutlerflet.app/Contents/Frameworks/serious_python_darwin.framework/Resources/python-stdlib/lib-dynload/_ssl.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/Python.framework/Versions/3.12/lib/libssl.3.dylib |
I got this error when I release it to test flight and test on my mac M4: File "/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/pypackages/pydantic_core/init.py", line 6, in |
Have you signed and notarized the bundle? |
I'm going to perform a full test of macOS packaging. Two things I suspect: 1) the app needs some entitlements: https://forums.developer.apple.com/forums/thread/716918 (also, |
Yes, I signed through xcode build/archive using mac distribution certificate and profile, and it passed app store connect upload. The error happened when I test in through TestFlight |
Good, will be investigating the issue. Packaging has #1 priority for us. |
@syleishere SSL issue has been fixed. macOS package now includes @dsx1986 For "library load disallowed by system policy" error I've opened another issue: #4543 |
How do we get latest fix? Did you release new version? |
I've updated iOS distro here: https://github.com/flet-dev/python-build/releases/tag/v3.12 |
All good.
|
Duplicate Check
Describe the bug
File "./ssl.py", line 100, in
ImportError: dlopen(/Users/dan/flet/crystaltunes/build/macos/Crystal Tunes.app/Contents/Frameworks/serious_python_darwin.framework/Resources/python-stdlib/lib-dynload/_ssl.cpython-312-darwin.so, 0x0002): Library not loaded: @rpath/Python.framework/Versions/3.12/lib/libssl.3.dylib
Referenced from: <025BF2AA-54E7-333A-B7FA-BD852F11C4CE> /Users/dan/flet/crystaltunes/build/macos/Crystal Tunes.app/Contents/Frameworks/serious_python_darwin.framework/Versions/A/Resources/python-stdlib/lib-dynload/_ssl.cpython-312-darwin.so
Reason: tried: '/usr/lib/swift/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file), '/Users/dan/flet/crystaltunes/build/macos/Crystal Tunes.app/Contents/Frameworks/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file), '/Users/dan/flet/crystaltunes/build/macos/Crystal Tunes.app/Contents/MacOS/Frameworks/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/Python.framework/Versions/3.12/lib/libssl.3.dylib' (no such file), '/usr/local/lib/libssl.3.dylib' (no such file), '/usr/lib/libssl.3.dylib' (no such file, not in dyld cache)
Code sample
Code
A simple hello world that does an "import ssl" is sufficient to reproduce along with a "flet build macos" and try to run app.
Should keep in mind here I am talking about the final build macos app, and not just running flet in pycharm or vscode, as that of course would work....
To reproduce
A simple hello world with "import ssl" or import aiohttp or httpx which will call import ssl for you under the hood.
flet build macos
and run the app in build/macos folder.
Expected behavior
The app should run fine, end users should not be expected to install python or openssl in order to run app. On windows builds the .dll files are included in same directory as the app itself, on macos the .dylib could be included. At this point I am thinking VMs should be created that are fresh for MacOS/windows with no python or anything development related installed and see if a simple flet program with 'hello world" and import ssl are working.
Screenshots / Videos
No response
Operating System
macOS
Operating system details
Mac Mini M4
Flet version
Latest devel
Regression
No, it isn't
Suggestions
After app is built you could do something like
or maybe _ssl.cpython-312-darwin.so could be built statically to include those 2 .dylib files somehow...
Logs
No response
Additional details
There are more dylib files that may be needed for other things as well:
The text was updated successfully, but these errors were encountered: