Interoperability page and lightbox

Hi!

I’d like to show a lightbox which displays progress of items that are being loaded within prepExplore()

$w("#button330").onClick(async (event) => {
        prepExplore();
        wixWindow.openLightbox("Processing - V0.1");
 });

The lightbox looks as follows. The 33% is fictive.

I’m trying to achieve that by exchanging information between my page and my lightbox through session variables. The session variable is set and continuously updated on the side of the page, based on the number of items that were already loaded

session.setItem('str_progress', JSON.stringify(progress)); 

while the session variable is read every second on the side of the lightbox

progress = JSON.parse(session.getItem('str_progress'));

The issue that I face is the following: while my items are being processed on my page, my lightbox doesn’t seem to retrieve the updates - instead, the lightbox already retrieves the total amount of items to be processed before they were even handled at the side of my page.

Console logs

[progress] items
10

[progress] processing
327

[progress] items
20

[progress] processing
327

[progress] items
30

[progress] processing
327

...

How is this possible and how can I resolve this?

Anyone?