HTTP 403 Error with Jira Connect Addin?


#1

I am trying to create a Jira Connect Addin… Following the basics tutorial hello world example) I have the issue where when I first click the greeting button, the addin returns a 403 error page from my webserver, and the page states that the addin is loading, but never displays, (obviously) If I however visit in my browser the page pointed to by the atlassian-connect.json, the page displays absolutely fine… any subsequent clicks on the greeting button actually displays the hello world messages (loads the page fine). After a period of time or after closing and reopening the browser I get the 403 Response again, until I again view the page as before… Would appreciate some advice, as the page is evidently being served correctly as it works, if I browse to it directly and the addin works thereafter.


#2

I think you need to start by gathering some more information about the problem.

The tutorial that you’re attempting is this one, right? Getting started.

In that tutorial, you run http-server, which would ordinarily log messages to standard output if it encounters an error. Do you see any such messages?

The tutorial also recommends that you use ngrok. Are you in fact doing that? ngrok has a really helpful feature for inspecting the traffic to/from your server. See if you can glean any useful information from that.

Just a hunch: please ensure that you specify the https URL for your ngrok service when you install your add-on in Jira. If you specify just http, I could imagine an http redirect causing the behaviour you are seeing.