How do I test Forge Apps locally?

Hello, I’m trying to run a Forge app locally. I’ve run all of the steps here: https://developer.atlassian.com/platform/forge/build-a-hello-world-app-in-jira/

including forge deploy and forge tunnel. I can see a docker container running locally, with a port mapping for 8000->8000 but I am not able to access the site via curl or browser. I cannot telnet into the port either.

How do I test a Forge app locally?

You’ll have to install your app onto a site prior.
Attempt to view your app
then attempt it again with the forge tunnel running. It should now run in your local instance instead.

Sorry, what does it mean to “install” on a site prior? If you mean running forge install, this is the error that I see when I run it:

Error: Insufficient permissions to install app (requestId: 567d670a4f02eb4d)

To install the app on this site, generate an installation link in the developer console and share it with the site admin: https://developer.atlassian.com/console/myapps/fe13be86-8acb-45f9-94df-e2c1969afe4d/distribution

The site I supply to the command is an Atlassian subdomain (mysite.atlassian.net).

How do I simply view the app running locally?

Yup forge install is the right command to install.

Are you the owner of the site?

If not I would recommend creating a testing site with Try Atlassian Products | Atlassian

Install and test your app on that site instead.

It’s not recommended to view the app outside of the Atlassian product as it may run differently. Running it with forge tunnel installed onto a site is the recommended way.

I cannot see where / how to create a test site on the page you linked.

I’m sorry, but why is it so complicated to do something that should be simple? I’m not trying to push any code to a remote environment. I simply want to develop a feature on Atlassian’s API locally. Are you saying I have to provision an environment remotely to begin the development process?

1 Like

In order to make use of the Atlassian API (e.g. creating and modifying Jira tickets, modifying Confluence pages) an Atlassian site must exist to handle these types of requests. An Atlassian product/environment must be provisioned in order to begin development process.

If you’re making a Forge app for Confluence could you please select “Try Cloud” for the Confluence product. It’s possible you may be seeing a different page than me for this in this case this link will let you make a free Confluence site that you can install your app and test on.