Atlassian Connect App - Jira installation "Problem accessing the file"

Hello,

When I try to install my app (which is hosted and accessible), I got this error

Problem accessing the file https://my-url/atlassian-connect.json.

I can access it on the browser. It’s accessing 443 port and redirecting to the port 80.
The app is running on a Docker exposing port 80.
There is no ip filter enable.

@Nolat,

Atlassian Connect only reads files via HTTPS. You need it to be available on port 443 with a non-self-signed security certificate, instead of redirecting to port 80.

@mventnor,

I misrepresented our situation, so we’re accessign the server through the 443 port with a non-self-signed certificate like you said. But we’re not redirecting to 80 port. In fact we have a Load Balancer doing the job. And still the Docker is on port 80.

Might it be the Load Balancer that is blocking Atlassian Connect ?

What if you execute a curl from a machine not on your network towards the Atlassian-connect.json url? Does that work?

Yes it does.
I actually tried to access the file from two phone outside the network and it works.

All right then the next thing is to take a look at the values inside the file. Make sure the base url is correct as well as any paths to the descriptor (self) as well as the install hook is correct.

The other item to check is to make sure that the mime type of the descriptor is coming back as application/json.

Well the file is working localy on my computer, so I imagine that it’s not coming from there.

{
  "key": "octave-jira-connect",
  "name": "Octave Jira Connect",
  "description": "Octave Jira Connect",
  "vendor": {
    "name": "Octave",
    "url": "https://octave.atlassian.net"
  },
  "baseUrl": "{{localBaseUrl}}",
  "links": {
    "self": "{{localBaseUrl}}/atlassian-connect.json",
    "homepage": "{{localBaseUrl}}/atlassian-connect.json"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed"
  },
  "scopes": ["READ", "WRITE"],
  "modules": {
    "webhooks": [
      {
        "name": "Issue closure",
        "url": "{{localBaseUrl}}/issue_closure",
        "event": "jira:issue_updated"
      }
    ]
  },
  "apiMigrations": {
    "gdpr": true
  }
}

localBaseUrl is replace by https://my-url in production

How can I check if the mime type is correct ? I don’t recieve any request from atlassian.

@danielwester So my file seems good after test on different environment.
And I didn’t found how to check the mime type when I get no request from atlassian when I send the file.

That’s strange - if it doesn’t work in one place - it shouldn’t work on any of them. And you had the “allow private installation” checkbox marked in the add-on manager? Otherwise the only thing I can think of is to drop in a DEVHELP ticket for somebody at Atlassian to dig into the first instance.

@danielwester
Both options are checked in the settings.

I will make a DEVHELP ticket so…

One thing you might check is the content type (i.e. check with content type application/json) if your atlassian-connect.json is returned.

Maybe the load balancer changes the content type or filters requests.

@marc How can I check the content-type when I’m not recieveing any request ?
I tried to use Webhooks to call the url and I don’t recieve the request.

But I can send request to the url with Postman.

@Nolat When you send the request with Postman, make sure you request the content type application/json and not text/html.

So yes the content type I send is application/json but that’s not the issue.

The issue is that Jira Webhooks send a POST request and I don’t recieve it. But it’s recieved on site like webhook.site (to test what request Jira send).

We’re using Haproxy, it might be the problem.

I am also facing the same issue. Strange thing is that same port is working when following the Get started tutorials but when trying the same step and port for own project, it is giving following error

Problem accessing the file https://bc38604d3b9b.ngrok.io/atlassian-connect.json.

Please help to resolve this issue. I am developing not putting into market place.

Same URL is working fine on site https://www.isitdownrightnow.com/

I found the solution. I am using angular project where accessing static file is not like example. After playing few config in angular, I am able to successfully upload the app to jira connect.

@nkgupta96 ,Nolat ,marc @danielwester, mventnor am also facing the same issue,I am trying to make and upload an app,I made the app using html and python(whihc includes,flask,ngrok-flask),when I hosted the app globally its working,but when I am trying to upload the app its showing "Problem accessing the file https://6b67046ef1d5.ngrok.io/basic.json." error,what can I do

It worked when I used heroku instead of ngrok