machawk1 / wail

:whale2: Web Archiving Integration Layer: One-Click User Instigated Preservation
https://matkelly.com/wail
MIT License
345 stars 32 forks source link

MemGator is not queried on first launch, race condition prevents query #523

Closed machawk1 closed 2 years ago

machawk1 commented 2 years ago

The code sends the request for MemGator before the service is running. "Fetching memento count..." remains indefinitely without any interaction of the URI text box. We could:

  1. check and if there is no MemGator process running, wait, and query again
  2. query the one-off service

Current main branch.

machawk1 commented 2 years ago

There also appears to be other MemGator-running-in-service mode race conditions, e.g., updating the UI before it has been initialized:

Exception ignored in thread started by: <bound method MemGator.fix_async of <__main__.MemGator object at 0x10dfe2ee0>>
Traceback (most recent call last):
  File "/private/tmp/wail/bundledApps/WAIL.py", line 1751, in fix_async
    main_app_window.adv_config.services_panel.status_memgator.SetLabel(
AttributeError: 'NoneType' object has no attribute 'adv_config'