Running the same Wixdata.Query doesn't always return results

I have a Wixdata.Query statement that I’m running when an image is clicked.

wixData.query(“collection”)
.eq(“id”, wixUsers.currentUser.id)
.eq(“matchId”, evt.context.itemId)
.find()
.then((matchingResults) => {
if (matchingResults.items.length === 0) {
item = null;
} else {// match found
item = matchingResults.items[0];
})

The strange thing is that when this query runs with the same parameters it somethings gives a correct result and sometimes it does not give any result at all. The collection is not changed during the query runs.
The parameters are always correct and the code gets to the Wixdata.query statement. (I have included logging statements in my code to see if it actually gets executed.)

When it does not return any value the .then statement is not executed and there is no error that is thrown.

Is this a known issue?
Thank you.

Hi Peroy,

Please paste your editor url here and we will further look into it.

Hi Peroy,
I suggest you use some console logs to verify that indeed the query you submit is always the same, and that the results for the same query vary from run to run.

post the results of your research when you have them…
thanks and good luck!