Iframe in Plasmic + Next.js App Router Keeps Refreshing

What are you trying to do?
I have a Plasmic project that contains an iframe element.
When I preview it on Plasmic hosting, everything works fine — the iframe content stays loaded as expected.

However, when I use Plasmic components inside my Next.js 15 app (App Router) via a catch-all route, the iframe refreshes itself every ~5 seconds. This happens both in dev and production builds.

Here’s my current catch-all page implementation:

import { PlasmicComponent } from '@plasmicapp/loader-nextjs';
import { notFound } from 'next/navigation';
import { PlasmicClientRootProvider } from "@/lib/plasmic-client";
import { PLASMIC } from "@/lib/plasmic";

export const revalidate = 60;

export default async function PlasmicLoaderPage({ params, searchParams }) {
  params = await params;
  searchParams = await searchParams;

  const plasmicComponentData = await fetchPlasmicComponentData(params?.catchall);
  if (!plasmicComponentData) {
    notFound();
  }

  const { prefetchedData } = plasmicComponentData;
  if (prefetchedData.entryCompMetas.length === 0) {
    notFound();
  }

  const pageMeta = prefetchedData.entryCompMetas[0];

  return (
    <PlasmicClientRootProvider
      prefetchedData={prefetchedData}
      pageParams={pageMeta.params}
      pageQuery={searchParams}
    >
      <PlasmicComponent component={pageMeta.displayName} />
    </PlasmicClientRootProvider>
  );
}

async function fetchPlasmicComponentData(catchall) {
  const plasmicPath = '/' + (catchall ? catchall.join('/') : '');
  const prefetchedData = await PLASMIC.maybeFetchComponentData(plasmicPath);

  if (!prefetchedData) {
    notFound();
  }

  return { prefetchedData };
}

export async function generateStaticParams() {
  const pageModules = await PLASMIC.fetchPages();

  return pageModules.map((mod) => {
    const catchall = mod.path === '/' ? undefined : mod.path.substring(1).split('/');
    return { catchall };
  });
}

What happens:

  • Everything except the iframe works perfectly.
  • The iframe reloads itself every ~5 seconds when rendered inside my Next.js app.
  • On Plasmic hosting (the default deployment), it behaves correctly (no constant refresh).

What I’ve tried:

  • Verified the iframe’s src is correct and stable.
  • Checked for any prop changes or state updates that could cause re-renders — couldn’t find any obvious cause.
  • Issue happens regardless of revalidate settings or ISR.

Question:
Why would the iframe keep refreshing when using Plasmic components in a Next.js App Router setup, and how can I stop it from reloading every few seconds?

Relevant links:

Hello,
is there really no one who could help?
This is a deal breaker for us.

Hello @pavol_kuva I noticed that you are using the HTML Embed component for the iframe. Plasmic also provides a dedicated Iframe component as well, any particular reason to not use that instead?