I am facing an issue with my next.js app hosted on Vercel, where I keep receiving a 500 error when trying to load a specific page. Upon inspecting the Chrome dev tools, I noticed that the error occurs when attempting to access the /dashboard
page. Despite knowing that it is not a server error since my backend functions properly in development and through Postman (both locally and with the production API URL), the page remains blank upon encountering the 500 error.
Another peculiar aspect is that the page loads perfectly fine initially after clearing the cache or logging out. However, upon refreshing the page for the first time, it consistently throws a 500 error while accessing the dashboard
page.
Upon experiencing the 500 error, it is evident from the network tab in the dev tools that the requests are not even reaching my backend.
The production URL can be found here
Please use the following login credentials:
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="017564727541646c60686d2f626e6c">[email protected]</a>
Test_user1234!
Once logged in, you should automatically be directed to the /dashboard
page, which may take some time to load on the first attempt. Subsequent reloads will result in the 500 error.
The requested data will be stored in the local storage for future reference.