Skip to content
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

[Tests] Error in GUI tests "test_gui.TimeoutException: Signal <bound PYQT_SIGNAL tribler_started of EventRequestManager object at 0x135dd49d0> not raised within 10 seconds" #6583

Closed
drew2a opened this issue Nov 24, 2021 · 7 comments · Fixed by #6828

Comments

@drew2a
Copy link
Contributor

drew2a commented Nov 24, 2021

During the test of #6580 the following error occurred:

Stacktrace

_____________________ ERROR at setup of test_popular_page ______________________

tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0...10700>, _basetemp=PosixPath('/private/var/folders/9h/rc1ccw796x7dsjy2_nxjrxw40000gn/T/pytest-of-tribler/pytest-7216')))

    @pytest.fixture(scope="module")
    def window(tmpdir_factory):
        api_key = hexlify(os.urandom(16)).encode('utf-8')
        root_state_dir = str(tmpdir_factory.mktemp('tribler_state_dir'))
    
        app = TriblerApplication("triblerapp-guitest", sys.argv)
        window = TriblerWindow(  # pylint: disable=W0621
            QSettings(),
            root_state_dir,
            api_key=api_key,
            core_args=[str(RUN_TRIBLER_PY.absolute()), '--gui-test-mode'],
        )  # pylint: disable=W0621
        app.set_activation_window(window)
        QTest.qWaitForWindowExposed(window)
    
        screenshot(window, name="tribler_loading")
>       wait_for_signal(
            window.core_manager.events_manager.tribler_started,
            flag=window.core_manager.events_manager.tribler_started_flag,
        )

src/tribler-gui/tribler_gui/tests/test_gui.py:51: 

Full log

https://jenkins-ci.tribler.org/job/GH_Tribler_PR_Tests/job/PR_GUI_macOS/3593/console

@ichorid
Copy link
Contributor

ichorid commented Nov 24, 2021

According to the log, the GUI can't connect to the Core (there is a number of connection timeout messages). This is probably due to changes in #6559

I suggest merging #6573 first before trying to tackle this issue.

@drew2a
Copy link
Contributor Author

drew2a commented Nov 25, 2021

Still reproduced in #6588 even after #6573 had been merged.

See https://jenkins-ci.tribler.org/job/GH_Tribler_PR_Tests/job/PR_GUI_macOS/3617/console

@ichorid
Copy link
Contributor

ichorid commented Nov 25, 2021

Looks like the Mac version of QT can't connect QThread slots to proper signals in UpgradeManager:

WARNING  root:utilities.py:387 Unable to hook up connect() info to <built-in method quit of QThread object at 0x155549820>. Probably a 'builtin_function_or_method'.
WARNING  root:utilities.py:387 Unable to hook up connect() info to <built-in method emit of PyQt5.QtCore.pyqtBoundSignal object at 0x1585c7450>. Probably a 'builtin_function_or_method'.
WARNING  root:utilities.py:387 Unable to hook up connect() info to <built-in method emit of PyQt5.QtCore.pyqtBoundSignal object at 0x1585c7540>. Probably a 'builtin_function_or_method'.
WARNING  root:utilities.py:387 Unable to hook up connect() info to <built-in method deleteLater of StateDirUpgradeWorker object at 0x155511d30>. Probably a 'builtin_function_or_method'.
WARNING  TriblerGUI:event_request_manager.py:119 Events connection dropped, attempting to reconnect
INFO     TriblerGUI:event_request_manager.py:128 Will connect to events endpoint
INFO     TriblerGUI:event_request_manager.py:72 Got Tribler core error: 204

We should either upgrade our QT libraries on Mac tester, or develop a workaround. I'll handle this.

@ichorid ichorid self-assigned this Nov 25, 2021
@drew2a
Copy link
Contributor Author

drew2a commented Nov 25, 2021

Please keep them up to date with https://github.com/Tribler/tribler/blob/main/src/tribler-gui/tribler_gui/requirements.txt

Keep in mind that it is possible to specify version-per-OS: https://pip.pypa.io/en/stable/cli/pip_install/#requirements-file-format

@drew2a
Copy link
Contributor Author

drew2a commented Nov 30, 2021

This issue occurred in #6594, see https://jenkins-ci.tribler.org/job/GH_Tribler_PR_Tests/job/PR_GUI_win64/3649/

@drew2a drew2a changed the title [Tests] Error in MAC GUI tests "test_gui.TimeoutException: Signal <bound PYQT_SIGNAL tribler_started of EventRequestManager object at 0x135dd49d0> not raised within 10 seconds" [Tests] Error in GUI tests "test_gui.TimeoutException: Signal <bound PYQT_SIGNAL tribler_started of EventRequestManager object at 0x135dd49d0> not raised within 10 seconds" Mar 21, 2022
@drew2a
Copy link
Contributor Author

drew2a commented Mar 21, 2022

@kozlovsky
Copy link
Contributor

I fixed unstable GUI tests, you can see details in #6828. The main fix was in passing dynamically calculated condition to the wait_for_signal function instead of a static flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants