Test my forge app but it doesn't work

I followed the tutorial and I’m testing my app.
The app should return the number of comments but it returns some error.
The error is shown below.

I also show the content of “index.js”.

Could you tell me what is the problem with my app?

@hirokinishimaki You might need to update your manifest.yml file to include the stylesheets. See this article for more understanding. By default, Atlassian blocks any policies that are considered unsafe for your app. To include items, such as inline CSS, you need to declare these items in the manifest.yml file of your app. You can do this by including new entries in the permissions.content section of the manifest.yml file.

1 Like

Sorry for the late reply.
I changed manifest.yml as below but it still don’t work.

@hirokinishimaki An issue I’ve noticed in the manifest.yml is the resource path. It should point to the build folder rather than the source location. By default, it should be set to static/hello-world/build , but you may need to adjust it according to your project’s structure. See the document on custom UI resources here.

So should I change the elements of resources?
If so, to what should I change from the current value?

@kashsingh the tutorial uses UI Kit 2, rather than Custom UI - so I think this is not a problem with the manifest.

@hirokinishimaki - it looks like you’re following the Build a hello world app in jira tutorial? on first look, your manifest.yml looks ok to me. I’m just looking over the rest of the details to see if I can work out what the issue is!

@hirokinishimaki I think the problem is that in the second part of the tutorial Call a Jira API, you’ve made the changes to src/index.js rather than src/frontend/index.jsx giving the error

Error: There was an error invoking the function - window is not defined

I think this is a mistake in the tutorial so thanks for picking that up, I have fixed the tutorial now.

I hope this helps!

[Edit 22-Feb - added specific error text for improved findability, updated as tutorial is now fixed]

Thank you for the reply.
I try to make changes to src/frontend/index.jsx.