Add-on is not responding. Wait or cancel?
Asked by Balkis Khouni:

Hello !

I am trying to make a simple HelloWorld add-on using **atlassian-connect-play-java** :

My Controller :

```
package controllers;import views.html.*;import com.atlassian.connect.play.java.controllers.AcController;import com.google.common.base.Supplier;import play.mvc.Controller;import play.mvc.Result;public class Application extends Controller {     public static Result index()    {        return AcController.index(home(), descriptor());    }     private static Supplier&lt;Result&gt; descriptor()    {        return new Supplier&lt;Result&gt;()        {            @Override            public Result get()            {                return AcController.descriptor();            }        };    }    private static Supplier&lt;Result&gt; home()    {        return new Supplier&lt;Result&gt;()        {            @Override            public Result get()            {                return ok(index.render("Hello"));            }        };    }}
```

My routes file :

```
GET / controllers.Application.index()GET /assets/*file controllers.Assets.at(path="/public", file)-&gt; / ac.Routes
```

My index:scala.html file :

```
@(message: String)@main("Welcome to Play") {        &lt;p&gt;@message&lt;/p&gt;   }
```

My main.scala.html file :

```
@(title: String)(content: Html)&lt;!DOCTYPE html&gt;&lt;html&gt;    &lt;head&gt;        &lt;title&gt;@title&lt;/title&gt;              &lt;script src="http://localhost:1990/confluence/atlassian-connect/all.js" type="text/javascript"&gt;&lt;/script&gt;        &lt;link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.4.3/css/aui.css" media="all"&gt;        &lt;link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")"&gt;        &lt;link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")"&gt;        &lt;script src="@routes.Assets.at("javascripts/jquery-1.9.0.min.js")" type="text/javascript"&gt;&lt;/script&gt;    &lt;/head&gt;    &lt;body&gt;        &lt;div class="ac-content"&gt;        &lt;p&gt;@content&lt;/p&gt;    &lt;/div&gt;            &lt;/body&gt;&lt;/html&gt;
```

My atlassian-connect.json file :

```
{     "key": "${addonKey}",     "name": "${addonName}",     "description": "Atlassian Connect add-on",          "baseUrl": "${localBaseUrl}",     "vendor": {        "name": "Atlassian",        "url": "http://www.atlassian.com"    },     "authentication": {         "type": "none"     },          "modules": {    "generalPages": [      {        "url": "/",        "key": "test-application",        "location": "system.user",        "name": {          "value": "Test"        }      }    ]  },  "scopes": ["READ"] }
```

What I get when I run my play application :

image2015-2-8 20:57:45.png

What I get when I install my plugin on a local instance of Confluence and run it :

image2015-2-8 20:59:5.png

I tried to find the problem but I couldn't, can someone please help ?

Thanks.


Answers:
author: m@
body: This will be because your addon is not responding to the iframe request for some reason. I would suggest using firebug or google chrome developer tools to see which request is failing. You should see a request to your addon either timing out, failing or going to the wrong host.


author: Balkis Khouni
body: Thank you @Matthew Jensen, I followed your advice and I did find the request that was failing.

The url that I specified in the descriptor was invalid. A simple **"/"** or an empty url **""** was not accepted by confluence so I had to change it to **"/home"** and change my routes file as well.

Thanks :smile:


Tags: cloud

confluence-cloud