Getting error after updating Plasmic loader

Hi we keep on receiving this error, we’ve already updated our plasmic loader package to 1.0.141

FetchError: invalid json response body at <https://codegen.plasmic.app/api/v1/loader/code/versioned?cb=7&platform=nextjs&loaderVersion=5&projectId=4oePdgY6VCnvZ6K6n5P4Sx%4021.4.6> reason: Unexpected end of JSON input

Hello @subjective_mouse. I think you’re missing your tokens in the plasmic.auth
You can learn how to set it up here
https://docs.plasmic.app/learn/cli/#plasmic-init

Hi Icaro, our app is using this initializtion

import { initPlasmicLoader } from "@plasmicapp/loader-react";
export const PLASMIC = initPlasmicLoader({
  projects: [
    {
      id: "PROJECTID",  // ID of a project you are using
      token: "APITOKEN"  // API token for that project
    }
  ],
  // Fetches the latest revisions, whether or not they were unpublished!
  // Disable for production to ensure you render only published changes.
  preview: true,
})

The project ID and API token is there.

Publishing is hit or miss, it works one time but then after changing a text copy it doesn’t work anymore and we encounter the error.

The API token I mentioned is your personal one, which is specific for you account and is used to see if you have access to the project

btw, we are using next.js, is there any guide on how to add the .plasmic.auth to our next.js app? I’ve followed the one on this guide to create it https://docs.plasmic.app/learn/faq/

The .plasmic.auth is something private for each user. You can follow the steps here to create yours https://docs.plasmic.app/learn/faq/#what-if-i-am-getting-authentication-errors-from-the-cli-or-loader