Btw, I suspect, this has got to do with onLogin() processing module in Wix. Same page, when I refresh, then onLogin portion doesn’t run and I don’t get this error.
Discovered something more. After login, user is taken to a page that loads list of all available online programs for users to enroll into. This page uses a programList object provided by Wix that lists all the program. I noticed that whenever I get the concerned error (TypeError: Cannot convert undefined or null to object at Function.entries), for some reason that object is not loaded. But if I refresh the page, this error goes away and object is loaded. So I had to add page refresh.