Exporting macro to pdf not working

Hey there,
anybody having issue with exporting macro to pdf? I updated my app yesterday and since then can’t get export to work, it was working previously. I’m getting out of ideas, please help.

I even created additional macro for testing, whenever I try to export to pdf I get the error “Error loading the extension!”. If I export to word, it all works good (and I see invocation in forge tunnel), but with pdf it looks like export function is not called at all (nothing in forge tunnel).

My code, anything I’m doing wrong?
Thank you.

manifest.yml

app:
  id: <appid>
  runtime:
    name: nodejs20.x #also tried with nodejs22.x

modules:
  ...
  macro:   
    - key: test-export
      resource: test-export-resolver
      render: native
      title: Test export
      layout: block #tried with block, inline, bodied, 'block', 'inline', 'bodied'
      resolver:
        function: resolver
      adfExport:
        function: test-adf-export

  function:
	...
    - key: resolver
      handler: index.handler
    #tests:
    - key: test-adf-export
      handler: macroTestExport.testAdfExport

resources:
	...
  - key: test-export-resolver
    path: src/frontend/testExportResolver.jsx

permissions:
  scopes:
    - read:space:confluence
    - write:space:confluence
    - read:confluence-space.summary
    - read:confluence-user
    - storage:app
    - read:confluence-content.summary
    - read:confluence-props
    - write:confluence-props
    - write:confluence-content
    - read:custom-content:confluence
    - write:custom-content:confluence
    - delete:custom-content:confluence
    - read:user:confluence
    - read:page:confluence
  external:
    fetch:
      backend:
        ...
    images:
      - "*.atlassian.com"

src/frontend/testExportResolver.jsx

import ForgeReconciler, { Text } from "@forge/react";

export const TestExportApp = () => {
  console.debug('TestExportApp')
  
   return (
      <>
        <Text>This is a macro for testing export </Text>
      </>
   )
}

ForgeReconciler.render(
  <React.StrictMode>
    <TestExportApp />
  </React.StrictMode>
);

src/macroTestExport.js

//import { doc, p,  } from '@atlaskit/adf-utils/builders';


export const testAdfExport = async (payload) => {
//tried also this way:
//   return doc(
//     p(`exportFunction`)
//     //p(`Hello world! This is an export of type ${payload.exportType}.`)
//   );


console.log("testAdfExport")
return {
      "version": 1,
      "type": "doc",
      "content": [
        {
          "type": "panel",
          "attrs": {
            "panelType": "info"
          },
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Test export."
                }
              ]
            }
          ]
        }
      ]
    }
}

Just checked because of your post and ours’ is also exporting with just “Error loading the extension!” (known to work previously)…

@dhreben I noticed you recently looked into something similar, is there a known issue at the moment?

@DavidPezet1 I think I have different issue. I’m able to export some dummy document, my issue is that I don’t know now to inline graphics in there. I suspect I will have to use some sort of file attachment API, tried a few things but no luck.
(To be clear, I’m not working on Forge, this app is my side project).

Thanks @DavidPezet1 for confirming my findings.
Can anyone else confirm whether they have issues? Or perhaps Atlassian stuff to take a look into it?

I have opened a developer ECO ticket, and after no quick response I also opened a general Atlassian support ticket, since I’m not sure which side of the fence this falls on. After reverting to a known working version which still failed, I also created a brand new app using the default Confluence Macro template (no changes) and this also fails to export inside the PDF (" Error loading the extension!").

Thank you @dhreben for the response. Out of curiosity, when was the last time you successfully deploy and then generated a PDF. Ours worked as of 2025-05-16, but noticed failing after @MateuszKny 's post.

I did exactly the same steps (new test app and reverting to old app), and also reverting to the previously-working code did not help.

My previous version (working one) were deployed 2025-04-06.
Then I deployed on 2025-05-20. But prior to deploy, as far as I can tell, it worked the same day. Looks like the deploy somehow broke something.

Hi,
I’m encountering a similar issue — when exporting a Confluence page to PDF, any Forge Custom UI macro I’ve added that renders a code block ends up showing the message “Error loading the extension!” instead of the expected content.

Just checking if you’ve found any root cause or workaround for this? It would be great to know if this is a known limitation with Forge Custom UI and PDF export.

Appreciate any updates!

Hi @ShivamMaurya, unfortunately I haven’t found any solution. I’m pretty sure this is not Forge limitation, as my export worked prior to deploying new version, and it still works with Word export. This looks to me like some issue on Atlassian’s side, as it seems that the export function is not called at all when exporting pdf.

General Atlassian support replied to my ticket and has reached out to the appropriate team, but I have not heard back any details yet and there hasn’t been any movement on my ECO ticket.

Hello All,
Hello, this is Damian from the CSS Ecosystem Support team.

I want to assure you that we are actively collaborating with the appropriate team to address this issue. Please feel free to open an ECOHELP ticket and include details such as the affected applications.

We anticipate having updates available during US business hours today.

1 Like

Hey everyone!

Sheri here from Ecosystem Support! Thanks so much for reporting this! The team has implemented a fix to address the issue. When you have a moment, please check on your end and let us know if everything is functioning as expected.

1 Like

Hi Sheri,

Thanks so much for the quick response and update!

I’ve just tested it on my end, and I can confirm that the issue is now resolved — the content of the Forge Custom UI macro is correctly appearing in the exported PDF. Appreciate the fix and your support!

1 Like

Hi @shericaocbania ,
Thank you for working on this.
Can you also add this to the Atlassian Statuspage as an incident?

Hi @shericaocbania, unfortunately it doesn’t seem to have worked for me.
I now get different error: “Error rendering app” in red panel, but it still doesn’t seem to call export function.

1 Like

Same issue on my side — I’m seeing the same error and the export function doesn’t appear to be triggered either.

1 Like

I just checked, and export to pdf seems to be working again.

2 Likes

This is resolved for us now as well. It did require deploying the app again. Thanks to all who helped!

@shericaocbania Is it possible something changed over the last few days? What was working 2025-06-06 now isn’t entirely working. While it isn’t resulting in “Error loading the extension!” again, it is failing to wait for the App to finish loading (resolving everything).