E405 when adding ai agent embed to nextjs site

  • mirnaeusebio
    Asked on August 12, 2025 at 1:29 AM

    Hi there,


    I am getting a:

    "Sorry, something went wrong. Please try again later. (E425). (destructured parameter) is null"

    when adding an AI agent embed to my site.


    ```tsx

    <Script

    src="https://cdn.jotfor.ms/agent/embedjs/01981ee95bdf72a7bb6ee80f23075e8b0bf5/embed.js?skipWelcome=1&maximizable=1"

    strategy="beforeInteractive"

    />

    {/* <Script

    src="https://cdn.jotfor.ms/agent/embed-bootstrap.js"

    data-agent-id="01981ee95bdf72a7bb6ee80f23075e8b0bf5"

    data-skip-welcome="true"

    data-maximizable="true"

    strategy="beforeInteractive"

    /> */}

    ```

    I tried both of these methods above ^ on our main layout page.


    I also tried adding it as a plain component:

    ```tsx

    <iframe

    id="JotFormIFrame-01981ee95bdf72a7bb6ee80f23075e8b0bf5"

    title="Logan: Customer Support Agent"

    onLoad={() => window?.parent?.scrollTo(0, 0)}

    allow="geolocation; microphone; camera; fullscreen"

    src="https://agent.jotform.com/01981ee95bdf72a7bb6ee80f23075e8b0bf5?embedMode=iframe&background=1&shadow=1"

    frameBorder="0"

    style={{

    minWidth: '100%',

    maxWidth: '100%',

    height: '688px',

    border: 'none',

    width: '100%',

    }}

    scrolling="no"

    />

    <Script

    src="https://cdn.jotfor.ms/s/umd/latest/for-form-embed-handler.js"

    strategy="afterInteractive"

    />

    <Script id="jotform-embed-init" strategy="afterInteractive">

    {`window.jotformEmbedHandler("iframe[id='JotFormIFrame-01981ee95bdf72a7bb6ee80f23075e8b0bf5']", "https://www.jotform.com");`}

    </Script>

    ```

    but this did not work either and stalls at thinking stage.

    Jotform Thread 29949341 Screenshot
  • Afzal JotForm Support
    Replied on August 12, 2025 at 1:58 AM

    Hi Mirna,

    Thanks for reaching out to Jotform Support. The error message Sorry, something went wrong. Please try again later. (E425). (destructured parameter) is null suggests there might be an issue with how the embed code is integrated into your site. Based on the information available, here are some important points and recommendations to help you resolve this issue:

    The best way to embed your AI agent is to use the embed codes provided directly from the AI Agent Builder under the Publish tab. You can select from different embed styles depending on your needs. To get the correct embed code, go to your AI Agent Builder, click on the Publish tab, then Embed on the left, and copy the embed code for the style you want. Paste this code directly into your website's source code.

    From your examples, it seems you have tried embedding the agent using a Script tag and an iframe, but the issue persists. Make sure you are using the exact embed code generated by the AI Agent Builder and not mixing different methods. Also, ensure that the embed code is placed correctly in your Next.js layout or page, respecting the loading strategy (such as "beforeInteractive" for scripts) as recommended.

    If the issue continues, it might be related to how your site handles scripts or iframe embeds. In that case, you may want to check for any JavaScript errors on your site console or conflicts with other scripts. Since this issue is specific to your site setup, you might need to work with your web developer to verify the integration or try embedding the agent on a simpler test page to isolate the issue.

    Let us know if you have any other questions.

Your Reply