Unable to install Connect app with JWT authentication type

Hello!

I’m trying to develop a custom Connect app with the following descriptor:

I’ve double checked that my file looks correct. Here are the contents of the file:

{
     "name": "Hello World",
     "description": "Atlassian Connect app",
     "key": "com.example.myapp.001",
     "baseUrl": "https://e3e7-186-97-175-34.ngrok-free.app",
     "vendor": {
         "name": "Example, Inc.",
         "url": "http://example.com"
     },
    "authentication": {
         "type": "jwt"
     },
    "apiVersion": 1,
     "modules": {
         "generalPages": [
             {
                 "url": "/helloworld.html",
                 "key": "hello-world",
                 "location": "system.top.navigation.bar",
                 "name": {
                     "value": "Greeting"
                 }
             }
         ]
     }
 }

But it keeps giving me the following error:

Could not install the file https://e3e7-186-97-175-34.ngrok-free.app/atlassian-connect.json. Check that the file is valid.

If I change the authentication key to none it works just fine. So it’s something to do with jwt authentication but I can’t figure out what.

Moreover the json validator available in the tools is also broken: https://atlassian-connect-validator.herokuapp.com/validate

Can someone help me debug this please?

Ok so I think I figured it out.

If you’re using jwt authentication, it requires you to have the lifecycle install and uninstall endpoints setup and working correctly (i.e returning 200s). Here is the final descriptor file I ended up with:

{
  "name": "Hello World",
  "description": "Atlassian Connect app",
  "key": "com.example.myapp.001",
  "baseUrl": "https://b0c1-186-97-175-34.ngrok-free.app",
  "vendor": {
    "name": "Example, Inc.",
    "url": "http://example.com"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/install",
    "uninstalled": "/uninstall"
  },
  "scopes": [
    "read"
  ],
  "apiVersion": 1,
  "modules": {
    "generalPages": [
      {
        "url": "/helloworld.html",
        "key": "hello-world",
        "location": "system.top.navigation.bar",
        "name": {
          "value": "Greeting"
        }
      }
    ]
  }
}

With the install endpoint up and running I was able to set this up successfully.

Would be really nice if there was a more descriptive error message though. This was a pain to debug, especially with the json validator down.