-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 4.1.2
-
Fix Version/s: 4.1.4
-
Component/s: OS Integration
Error
Sentry Issue: NUXEO-DRIVE-ZQ
ImportError: dlopen(/Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/QtCore.so, 2): Symbol not found: __os_log_default Referenced from: /Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/../QtCore (which was built for Mac OS X 10.11) Expected in: /usr/lib/libSystem.B.dylib in /Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/../QtCore File "__main__.py", line 246, in <module> File "__main__.py", line 242, in main File "__main__.py", line 111, in show_critical_error ImportError: dlopen(/Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/QtCore.so, 2): Symbol not found: __os_log_default Referenced from: /Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/../QtCore (which was built for Mac OS X 10.11) Expected in: /usr/lib/libSystem.B.dylib in /Applications/Nuxeo Drive.app/Contents/MacOS/PyQt5/../QtCore File "__main__.py", line 234, in main File "pyimod03_importers.py", line 627, in exec_module File "nxdrive/commandline.py", line 18, in <module> File "pyimod03_importers.py", line 627, in exec_module File "nxdrive/osi/__init__.py", line 6, in <module>
In this case, I think the user is running Mac OSX 10.10 or lower.
Fix
As we cannot have a working Qt, we should fallback on native dialogs.
On macOS (https://stackoverflow.com/a/50497906/1117028):
osascript -e 'Tell application "System Events" to display dialog "Some Funky Message" with title "Hello Matey"'
On Windows: https://stackoverflow.com/a/27257176/1117028
Refactoring
We should also refactor __main__.py and move functions to their own file, let's say fatal_error.py.