hey,
there are sometimes where a production plasmic page is showing a staging page content (using staging environment variables).
we are using nextjs with runtime environment variables (https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration).
any idea what can cause it?
Hi @prime_flamingo, what is the staging page content that you are seeing unexpectedly in production? Are you seeing unpublished plasmic designs in production? In that case, do you happen to have preview set to true in your Plasmic initialization?
Or are you seeing content from a staging data source show up in your plasmic page? Plasmic shouldn’t be able to control what next configuration or environment variables are being used…
Hey @yang
our staging env is the preview env, so i’m not sure whether its the preview or staging designs, but i will try to figure it out.
any way, both of them should not happen due to this configuration:
ok looks like its the staging published version that im seeing
@yang
this happens only on one of our pages and not always.
any idea what could cause this?
https://www.tabnine.com/tabnine-vs-githubcopilot-2
tried to duplicate the page. nothing works
Hi @prime_flamingo, can you help me figure out what should I be looking for to see what’s unexpected?
I see that the latest version tagged prod
looks the same as what is live in production, which seems to match up with what I would expect:
Also, that page looks !
thanks!
the page on the left is actually the wrong page and is actually looking at our staging env.
i can tell from the staging chatbot in the right bottom corner.
if you refresh you will probably see it change to different looking chatbot, as well as the external links on the page (like the user profile button link)
also, after investigating, it looks like the problem is specifically with this URL.
when redirecting to another URL this problem doesnt reproduce (at least for one day now…):
https://www.tabnine.com/tabnine-vs-github-copilot
Very strange - here’s what I see:
• https://www.tabnine.com/tabnine-vs-githubcopilot-2
◦ Profile link goes to staging
◦ Staging chatbot
• https://www.tabnine.com/tabnine-vs-github-copilot-x
◦ Profile link goes to prod
◦ Prod chat bot
• https://www.tabnine.com/tabnine-vs-githubcopilot
◦ Profile link goes to staging
◦ Staging chatbot
It’s definitely super weird that the same production site has what seems like a mix of different environments.
Although, one thing to note is that the profile link itself is not actually managed in Plasmic - it’s just a normal React component from your codebase. So it might be a good starting point to dig into what is going on.
For instance, even if you remove all Plasmic rendered components from that page and just render that profile link from your codebase, does it still point to app-staging?
this profile link is a part of our custom react component, called Page
.
so you mean i should remove the entire content of the page in plasmic studio, except for the page component?
im sure it will still point to staging
Oh no, I just mean, instead of rendering <PlasmicComponent…/>, render your own component
We can see if tha will isolate the problem just within your codebase, independent of Plasmic
ok so to do so, i will have to separate this specific page into a different file ([…catchall] will not handle it so other pages won’t get effected).
will do it today and get back to you with the results.
thank you!
Yeah… it could be perhaps just a hidden URL. But I don’t know that will necessarily repro the issue, since already we can see that some routes exhibit the issue and some don’t! Hopefully simply figuring out how to repro the issue will illuminate much more of the problem
i cannot seem to use the catch-all route as well as the specific page route
error - Conflicting paths returned from getStaticPaths, paths must be unique per page.
See more info here: <https://nextjs.org/docs/messages/conflicting-ssg-paths>
path: "/tabnine-vs-githubcopilot" from page: "/[...catchall]" conflicts with path: "/tabnine-vs-githubcopilot"
will just try to strip all of the content of this page in the plasmic studio