Tribler: Tribler does not start in Big Sur

Created on 13 Nov 2020  路  5Comments  路  Source: Tribler/tribler

Apple released macOS Big Sur yesterday. However, this seems to be incompatible with the Tribler 7.5.4 dmg. I can reproduce this issue. Starting Tribler gives the following output and then seems to do nothing anymore:

martijndevos@MacBook-Pro-van-Martijn MacOS % ./tribler
[PID:49492] 2020-11-13 10:26:41,750 - INFO - root(24) - __init__()
[PID:49492] 2020-11-13 10:26:41,850 - INFO - root(50) -   self._outSocket.error() = '2'
[PID:49492] 2020-11-13 10:26:41,850 - INFO - root(60) - __init__(): returning
[PID:49492] 2020-11-13 10:26:42,488 - INFO - TriblerGUI(134) - Will connect to events endpoint
[PID:49492] 2020-11-13 10:26:42,566 - INFO - TriblerGUI(78) - Got Tribler core error: 1

I suspect that the issue is related to PyQt, since the GUI is not showing up.

Is there anyone else with Big Sur that can test this?

broken bug

Most helpful comment

Workaround that seems to fix the issue (thanks to this PyInstaller issue):

os.environ["QT_MAC_WANTS_LAYER"] = "1"

Tested it and it seems to correctly start Tribler 馃憤 . I will implement this workaround as soon as I can.

All 5 comments

Possibly related to https://github.com/pyinstaller/pyinstaller/issues/5107

Edit: it seems that we are still using PyInstaller 3.6. We should try it with Pyinstaller 4 first.

Edit 2: upgrading to Pyinstaller 4 is not fixing the issue.

Is there anyone else with Big Sur that can test this?

I can test it soon.

Unfortunately, I can reproduce this issue when bundling the following program with PyInstaller, and running it on Big Sur:

import sys
from PyQt5.QtWidgets import QApplication, QMainWindow

app = QApplication(sys.argv)
window = QMainWindow()
window.show()

app.exec_()

This means that the issue is likely somewhere in PyInstaller + PyQt5.

It actually seems to be a PyQt5 issue, based on this, this and this report. Riverbank will hopefully release a version of PyQt5 that works on Big Sur.

Downgrading PyQt5 to 5.13.1 is reported to resolve the problem. However, I'm not sure if Brew has a bottle for this version, meaning that we have to manually compile PyQt5...

Workaround that seems to fix the issue (thanks to this PyInstaller issue):

os.environ["QT_MAC_WANTS_LAYER"] = "1"

Tested it and it seems to correctly start Tribler 馃憤 . I will implement this workaround as soon as I can.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devos50 picture devos50  路  4Comments

N0rbert picture N0rbert  路  3Comments

NoNameForMee picture NoNameForMee  路  6Comments

ichorid picture ichorid  路  11Comments

filicado picture filicado  路  9Comments