Trouble with Forge App

Jim Gilliam
Contributor
October 20, 2024

I don't understand why my test app isn't working. One of the console errors says it can't find the resource, but the macro app deployed successfully to my dev environment.

Here is the index.js (backend)

 

import ForgeUI, { render, Fragment, Macro, useState } from "@forge/ui";
const App = () => {
const flareHelpUrl = "{enter URL here}";

  return (
    <Fragment>
      <Macro>
        {/* Embed the entire help system in an iframe */}
        <iframe
          src={flareHelpUrl}
          width="100%"
          height="600px"
          frameBorder="0"
          title="MadCap Flare Help System"
          allowFullScreen
        ></iframe>
      </Macro>
    </Fragment>
  );
};

// Export the run function as needed by Forge
export const run = render(<App />);

Here is my manifest.yml

 

modules:
  macro:
    - key: ccignitehelp-embed
      function: main
      title: "Embed Full Help System"
      description: "Embed the full MadCap Flare Help system."
      outputType: inline

  function:
    - key: main
      handler: index.run

permissions:
  scopes:
    - read:confluence-content.summary
    - write:confluence-content

app:
    runtime:
      name: nodejs20.x
    id: ari:cloud:ecosystem::app/...............

2 answers

1 accepted

2 votes
Answer accepted
Lucas Modzelewski _Lumo_
Atlassian Partner
October 20, 2024

If you are using chat GPT, it's cut off date is before lots of important changes ;) 

eg. @Forge/ui was replaces with @Forge/react 

Check this to see how you can upgrade macro from UI kit 1 to UI kit: https://developer.atlassian.com/platform/forge/ui-kit/upgrade-to-ui-kit-latest/#confluence-macro-configuration 

Also for any development related question there is dedicated for dev community: https://community.developer.atlassian.com/ 

Jim Gilliam
Contributor
October 22, 2024

Oh yep... this is probably it! I read about the change somewhere... probably in the terminal.

0 votes
Barbara Szczesniak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2024

@Jim Gilliam I don't know anything about Forge apps, but there is an active incident that might be affecting you: https://developer.status.atlassian.com/ 

Jim Gilliam
Contributor
October 22, 2024

I'm not in the EU. Seems more like something wrong with the code.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events