The app host returned HTTP response code 404 when we tried to contact it during installation

I am trying to run my Confluence add on and although it worked for me on the first try (the day before posting this question), as I tried to run it this morning I stumbled upon this error:

I’ve been looking over a few forums, where the suggestion is to update the lifecycle to refer to //installed instead of /installed, but this does not fix the issue for me. Other forums I found suggest to change the authentication type to none and remove the lifecycle, but to my knowledge my add-on depends on the lifecycle as this would trigger the created webhook from the modules specified in my atlassian-connect.json file:

{
  "key": "confluence-multipage-blueprint",
  "name": "Confluence Multipage Blueprint",
  "description": "A Confluence Multipage creation tool for Project Management",
  "vendor": {
    "name": "CodeParticle",
    "url": "https://www.codeparticle.com/"
  },
  "baseUrl": "{{localBaseUrl}}",
  "links": {
    "self": "{{localBaseUrl}}/atlassian-connect.json",
    "homepage": "{{localBaseUrl}}/atlassian-connect.json"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed"
  },
  "scopes": [
    "READ",
    "WRITE"
  ],
  "modules": {
    "blueprints": [
      {
        "template": {
          "url": "/blueprint.xml"
        },
        "createResult": "edit",
        "description": {
          "value": "Create simple multi-pages"
        },
        "key": "remote-multipage-blueprint",
        "name": {
          "value": "Simple remote multi-page blueprint"
        }
      }
    ],
    "webhooks": [
      {
        "event": "connect_addon_enabled",
        "url": "/created"
      }
    ]
  }
}

Where a file created.js performs the operations for my add-on. I have not changed any code from yesterday to today, so I’m not sure what could be causing this. Please let me know if there are any options I should take, or if I should need to specify this issue further.

I see you’re using ngrok. Those url’s usually change quite frequently (at least once a day). You may need to uninstall and reinstall with the new ngrok URL.

Could you please clarify how I can reinstall? I may be understanding it wrong, but when the app registers on my terminal, it gets installed on the confluence space? If so, that means I should be able to navigate to it and remove it, then run it from my terminal again?

I need to know a little more about your app to help you out. Are you using Atlassian Connect Express to run your app? Or is it a custom app you built?

If Atlassian Connect Express are you using the credentials.json file?

It’s Atlassian Connect Express app, and I do have a credentials.json file

OK this all looks fine on your end.

With the app not running. Go into your Manage Apps Admin and see if it’s listed. If it is uninstall it and then try running your app again.

2 Likes

Thank you very much! Uninstalling the app and reinstalling it worked. Do you know if there would be a way to uninstall it as soon as it runs? To avoid having to manually uninstall every time

ACE should uninstall it when you hit Control-c … sometimes the sigint end app event doesn’t fire and that’s when you get into this situation.

@rwhitbeck I believe that something have changed recently. I install the app manually and I am changing ngrok url frequently. I never had to uninstall the app. Today I stumbled upon the problem that I can’t install the app. I was getting 404 and ACE logged 302. After I restarted everything and started to give up, I uninstalled the app and tried again. That helped. Seeing many thread on community, it seem I am not alone.

@rwhitbeck we’re seeing the same issue in our instances. Sometimes 404s and sometimes SSL errors. The behaviour is inconsistent as some instances work fine and others not. Moreover we started seeing the issue with MPAC private apps too.

I believe the frequency of this indicate something broken with app installs as opposed to user error. Do you mind asking the team responsible for this to check if there’s anything wrong on their side?

3 Likes

Please raise this as a bug on the Developer Support Service Desk. https://ecosystem.atlassian.net/servicedesk/customer/portal/14

1 Like

Actually it looks like this has been raised already as a Critical Cloud incident and is already being looked at.

A fix looks to have been released and this should now be fixed.

1 Like