Matomo displays only real time data, all other views are blank

I have recently installed Matomo and have configured for one of my React application. I am seeing data for only Visits in Real-time. I could see the user, actions, external link click all of it. But when I go to events or visits log there is no data. Also I keep getting the error message - ‘oops there was a problem during request.’ Data size is not big as I am the only one testing it. Could anyone please help.