"Incorrect Plasmic credentials"

I am trying to install a codegen project on my server, like I did it before. It used to work, but now I get the error “Incorrect Plasmic credentials”.

The logs say:

Let’s get started! Here’s what we’ll do:

  1. Authenticate with Plasmic
  2. Create a React/Next/Gatsby repo
  3. Integrate with Plasmic

==================================================
AUTHENTICATING WITH PLASMIC

Plasmic credentials are ok.

but then:

found 0 vulnerabilities
Successfully added @plasmicapp/react-web dependency.

Plasmic error: Incorrect Plasmic credentials; please check your .plasmic.auth file or your project API tokens.Error: Incorrect Plasmic credentials; please check your .plasmic.auth file or your project API tokens.
at PlasmicApi.post (/home/stardust/webapps/stardust/stardust/node_modules/@plasmicapp/cli/dist/index.js:502214:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PlasmicApi.resolveSync (/home/stardust/webapps/stardust/stardust/node_modules/@plasmicapp/cli/dist/index.js:502056:18)
at async sync (/home/stardust/webapps/stardust/stardust/node_modules/@plasmicapp/cli/dist/index.js:504631:29)

I found a file called .plasmic.auth inside home > username with the credentials.
When I delete that file and re-run the create-plasmic-app, the script still says that the credentials are found (??) and then that they are incorrect.

How can I solve that issue?

Thanks!

Hello @clemens_vie. Can you go into Plasmic and check if your .plasmic.auth configuration matches your Personal Access Token? If you have our CLI installed, you can run plasmic auth to generate the auth file.

Hello @icaro_guerra - thanks for your reply.

It seems the issue was that we run “plasmic auth” before without “sudo”. There was a success message and the new key was entered into the file, but it never worked. Now we did it with sudo and it worked. I still can’t explain why, but at least its working now :wink:

Thanks!