Internal Server Error : Error fetching loader data

Project URL: Plasmic

Suddenly this error occur in my project, I read the support forum of other ticket, all it says this error occurs from plasmic itself.

I would be in need of some urgent help, as this is priority. If anyone from plasmic team can solve it and update to the earliest, it would be highly beneficial.

Thanks for all the support.

Hi @dev_net-art, could you please share your plasmic_init configuration? Also, can you let me know where(page/component) exactly this error is being thrown?

Hi,

I didnt make any changes in plasmic_init config, the website was fine till yesterday, I was testing the flow.

API Request failed the one which I was working in the path /vendor/steps. Failed in the sense authentication failed of API Request, which happened previously as well. Then I reload and this happened in the screen.

This is my plasmic-init token and id I have cross checked it is right, and the Plasmic Hydration consists of this

The above issue occuring in localhost:3000 while running my next js thing. In Plasmic Dashboard the project is working fine.

And this error occuring in all the pages. Not on specific pages. But I havent made any changes to my next js file which will cause this issue I was just preview the localhost:3000 and testing the flow.

I have deleted my node js module and build folder and again rebuild and installed still it is same.

I have also cloned the plasmic project to check if there is any issue but still the same issue occured.

Any update on the matter ?? Let me know if something need to be done from my side.

Hi @dev_net-art,
It looks like there’s an issue with the Steps — specifically in the userInfo logic where you’re accessing localStorage in the header.

You might want to add a check to ensure the code only runs on the client side and the token exists, like this:

let token = "bearer null";
if (typeof window !== 'undefined' && typeof localStorage !== 'undefined') {
  const jwt = localStorage.getItem("strapi-jwt");
  if (jwt) {
    token = `bearer ${jwt}`;
  }
}