After booting the Pi, if the asset set is a single image, it doesn't display, the screen remains dark with only the small purple screenly logo in the center

We have been struggling with this over the past week or so with new builds on Pi 3 B+ and Pi 4 B units. To install we use Raspbian Lite, run updates and raspi-config, and run the Anthias install shell script.

Once configured and loaded with a single asset I was able to follow the process and see that it would get to the loading of the STANDBY_SCREEN, trigger the main loop, and trigger the asset (the asset is a web page if that is relevant), but that asset would not be displayed. If there was a second asset, it would be displayed after the delay for the first asset expired which would get things working. If we changed something about the single asset to cause the asset list to be generated again this would also resolve the issue.

To resolve this at the viewer.py level, I noted that there is a sleep delay built into the end of the asset_loop but there was no delay after the initial loading of the STANDBY_SCREEN in main. Once I added a sleep directly before the call from main to start_loop, everything started working as expected for single asset lists after reboots or restarting the viewer container.

Original viewer.py code:

    view_image(STANDBY_SCREEN)

    load_screen_displayed = True

    if mq_data is not None:
        show_hotspot_page(mq_data)
        mq_data = None

    start_loop()

Update to resolve single asset issue:

    view_image(STANDBY_SCREEN)

    load_screen_displayed = True

    if mq_data is not None:
        show_hotspot_page(mq_data)
        mq_data = None

    sleep(0.5)

    start_loop()