beeware / toga

A Python native, OS native GUI toolkit.
https://toga.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
4.19k stars 655 forks source link

Intermittent "MapView web canvas didn't initialize" error in Windows CI #2632

Open mhsmith opened 3 weeks ago

mhsmith commented 3 weeks ago

This isn't happening as often as the intermittent macOS failures (#2512 and #2631), but I've seen it at least 4 times over the last month. Here are the two most recent ones:

=================================== ERRORS ====================================
___________________ ERROR at setup of test_flex_widget_size ___________________
Traceback (most recent call last):
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app_packages\pytest_asyncio\plugin.py", line 299, in _asyncgen_fixture_wrapper
    result = event_loop.run_until_complete(setup())
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app\tests\conftest.py", line 96, in run_until_complete
    return asyncio.run_coroutine_threadsafe(coro, self.loop).result()
  File "concurrent\futures\_base.py", line 458, in result
  File "concurrent\futures\_base.py", line 403, in __get_result
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app_packages\pytest_asyncio\plugin.py", line 281, in setup
    res = await gen_obj.__anext__()
  File "D:\a\toga\toga\testbed\build\testbed\windows\app\src\app\tests\widgets\test_mapview.py", line 53, in widget
    raise RuntimeError("MapView web canvas didn't initialize")
RuntimeError: MapView web canvas didn't initialize
=========================== short test summary info ===========================
ERROR tests/widgets/test_mapview.py::test_flex_widget_size - RuntimeError: MapView web canvas didn't initialize
======= 417 passed, 45 skipped, 4 xfailed, 1 error in 218.74s (0:03:38) =======
freakboy3742 commented 2 weeks ago

I've seen this one too; however, my read is that this might be outside our control. We get a bunch of failures that amount to "Github's CI machine falls off the network" - failures contacting the Ubuntu package server etc. It's disturbing how often this happens, but I'm not sure there's much we can do about it when it does, other than perhaps increasing retries and timeouts.

mhsmith commented 2 weeks ago

I used to have similar problems in the Chaquopy CI, and I found some discussion which led me to this action which I now run at the start of every job. Since then, the problems have completely disappeared.

freakboy3742 commented 2 weeks ago

Interesting... can't hurt to try adding that one in, I guess...

mhsmith commented 1 week ago

Still happening, unfortunately: https://github.com/beeware/toga/actions/runs/9589159070/job/26442549519