Randomly can't connect with Plasmic in Next.js SSR pages

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets)

I’ve got a Next.js pages router site running already for a long time and it uses a single component from Plasmic that is added on top of the page (black banner in this case). It has been implemented according to the instructions from Plasmic after clicking Code button.

Recently however, occasionally some SSR pages started breaking and throwing 500. Moreover, sometimes it’s 50/50 whether the page breaks or not.

At first, the error looked like this:

│ website  ⨯ [FetchError: request to https://codegen.plasmic.app/api/v1/loader/code/published?platform=nextjs&projectId=47FNcjnqkpsBF5ZsVyJ8Dk failed, reason: getaddrinfo ENOTFOUND codegen.plasmic.app] {                   │
│ website   type: 'system',                                                                                                                                                                                                   │
│ website   errno: 'ENOTFOUND',                                                                                                                                                                                               │
│ website   code: 'ENOTFOUND',                                                                                                                                                                                                │
│ website   erroredSysCall: 'getaddrinfo'                                                                                                                                                                                     │
│ website }

After renaming the component and redeploying, it all started working, but not for long. I got another report, this time the logs looked like this:

│ website-6dc4f9cc4d-qldj5 website  ⨯ Error: Error fetching loader data, a redirect was expected: Project with ID 47FNcjnqkpsBF5ZsVyJ8Dk not found                                                                            │
│ website-6dc4f9cc4d-qldj5 website     at Generator.next (<anonymous>)

This project ID is clearly my Plasmic project that exists. Why does it happen? I’m pretty much clueless at this point, and Plasmic status seems to be 100% up.

What are the reproduction steps?

  1. Create a Next.js project
  2. Connect a page to Plasmic via instructions located at Code button, Next.js section
  3. Roll the dices
  4. It will probably work for you 100% times, but in my use case, it somehow stopped working for SSR pages.

Relevant links:

Hello @bartosz_holubowicz, thank you for reporting. Our team is actively investigating the issue.

1 Like

Hi @bartosz_holubowicz, we believe we’ve found the issue and have resolved it. Please let us know if you are still encountering this issue.