Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1673

Use native dialog when Qt is unavailable (for the fatal error screen only)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.4
    • Component/s: OS Integration

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h