Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA Forge App is not working

Inayatulla Shaik September 23, 2025

I have created a forge Application with name 'IssueDetailsPrinter'

1. I have added below permission to manifest.yml file

permissions:
  scopes:
    - read:jira-work
2. I have added below code to src/index.js file and src/resolvers/index.js file
import ForgeApi from '@forge/api';
import Resolver from '@forge/resolver';

const resolver = new Resolver();

resolver.define('getIssueDetails', async ({ payload, context }) => {
  try {
    const { issueId } = payload;
    const response = await ForgeApi.asApp().requestJira(
      `/rest/api/3/issue/${issueId}`
    );

    if (!response.ok) {
      const errorText = await response.text();
      return {
        error: `Error from Jira API: ${response.status} - ${errorText}`,
      };
    }
const data = await response.json();
    console.log(data)
    return data;
  } catch (error) {
    console.error('Backend error:', error);
    return {
      error: `An error occurred while fetching issue details: ${error.message}`,
    };
  }
});

export const handler = resolver.getDefinitions();
3. Added beow code to src/frontend/index.jsx file
import React, { useEffect, useState } from 'react';
import {
  Text,
  useProductContext,
  useAction,
  SectionMessage,
  LoadingSpinner,
} from '@forge/react';
import { invoke } from '@forge/bridge';

const App = () => {
  const context = useProductContext();
  const [issue, setIssue] = useState(null);
  const [error, setError] = useState(null);
  const [isLoading, setIsLoading] = useState(true);
  useEffect(() => {
    async function getIssueDetails() {
      try {
        if (!context?.issueId) {
          setError('Could not get issue ID from context.');
          setIsLoading(false);
          return;
        }

        const response = await invoke('getIssueDetails', {
          issueId: context.issueId,
        });

        if (response.error) {
          setError(response.error);
        } else {
          setIssue(response);
        }
      }catch (err) {
        console.error('Error fetching issue details:', err);
        setError('An unexpected error occurred.');
      } finally {
        setIsLoading(false);
      }
    }

    getIssueDetails();
  }, [context]);

  if (isLoading) {
    return <LoadingSpinner />;
  }

  if (error) {
    return (
      <SectionMessage appearance="error" title="Could not load issue details">
        <Text>{error}</Text>
      </SectionMessage>
    );
  }
  return (
    <>
      {issue ? (
        <>
          <Text>
            <b>Issue Summary:</b> {issue.fields.summary}
          </Text>
          <Text>
            <b>Reporter:</b> {issue.fields.reporter.displayName}
          </Text>
        </>
      ) : (
        <Text>No issue details found.</Text>
      )}
    </>
  );
};

export const run = () => (
  <App />
);
After this, I ran 'forge deploy' and 'forge install' commands
4. After that While I am trying to access the forge app from JIRA Issue Panel
   no output is being shown on Jira Issue panel expect think while lines are appearing under the jira forge app name.
Please assist me why I am not getting expected out.
Thanking you 

1 answer

0 votes
MM
Contributor
September 23, 2025

I have the same issue for the last hour.

Trying to fetch issues from rest/api/3, no data shows.

Nothing is getting logged either... so my log files are blank.

Strange thing is that I am able to list boards.

Is it possible that only some api calls are working and others not?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events