Hello,
I'm currently developing a Forge app for Jira, which aims to display a custom page listing vehicles. This data is fetched from an external API hosted on the company’s domain.
To achieve this, I'm using a backend function (resolver) that performs a fetch()
request to the API, and a React frontend that calls this function using invoke('getVehicles')
. The architecture seems correct, and I’ve properly declared the domain in the manifest.yml
under permissions.external.fetch.backend
.
However, when testing the app from Jira Cloud, I encounter a 502 Bad Gateway error in the console. Forge logs show an error of this kind:
"PS C:\Users\mathi\Documents\Stage\API\liste_VEH> forge logs
ERROR 2025-04-15T06:24:50.084Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Erreur API: 502 Bad Gateway
INFO 2025-04-15T06:24:50.072Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Réponse brute: Bad Gateway
INFO 2025-04-15T06:24:50.070Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Statut HTTP: 502
INFO 2025-04-15T06:24:49.674Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Body: ListVeh=
INFO 2025-04-15T06:24:49.673Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Headers: {
"Authorization": "****************",
"Content-Type": "application/x-www-form-urlencoded"
}
INFO 2025-04-15T06:24:49.672Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 URL: url_API
INFO 2025-04-15T06:24:49.671Z 19f3b486-ec69-4f3e-9785-ba16b61ad7e4 Envoi de la requête à l’API externe..."
Interestingly, when I test the same request locally using curl
, I get a valid response with the expected data. So, the API is clearly accessible from my personal network.
I'm wondering if this error could be related to the fact that my app uses a remote service, making it incompatible with the "Runs on Atlassian" program (as indicated by the forge eligibility
command). Could this prevent outbound requests from Forge? Or could it be due to a network restriction on Atlassian's side, or even a server-side block on requests coming from Forge instances (e.g., due to user-agent, missing headers, etc.)?
I’ve attached the manifest.yml
, index.js
, and App.js
files for reference.
Thank you in advance for your help,
Best regards,
Mathis.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.