11 Replies Latest reply on May 29, 2015 7:35 AM by jdvande

    Has anyone successfully created an app in a Jive add-on??

    cgum

      I have followed the instructions to the best of my ability, but I must admit that I am stumped.

       

      I have created a simple add-on is supposed to host an app.  I upload the .jive package (and made it public), it shows up in the list of installed packages (no warnings or anything).  I see that Jive is making calls to retrieve the app.xml and the various icons.  The serviceURL register call succeeds, but my app is nowhere to be found and I don't really know how to debug this any further.  I would expect my app to show up in the Apps drop-down. 

       

      Has anyone else had any success uploading a custom app via the add-ons UI?

       

      Any help would be much appreciated.

        • Re: Has anyone successfully created an app in a Jive add-on??

          Hi Casey!

           

          Yes, I've build a number of apps delivered through an addon.

           

          my osapps section looks like this:

            "osapps": [

                  {

                      "url" : "https://servert/app.xml",

                      "id" : "fddsfsd62-9477-400a-afab-27eesadfsadf",

                      "name" : "SmarterPath (Preview)",

                      "appPath" : "smarterpathdemo"

                  }

              ]

           

          Can you post your definition?

            • Re: Has anyone successfully created an app in a Jive add-on??
              cgum

              Here's my definition.json file:

               

              {

                "integrationUser": {},

                "osapps": [

                  {

                    "name": "cluster-app",

                    "displayName": "addon.name",

                    "description": "addon.description",

                    "remove": true,

                    "id": "09f11d6b-b762-49d6-ae1d-d4398abceea0",

                    "url": "%serviceURL%/app/app.xml",

                    "appPath": "cluster-app"

                  }

                ]

              }

               

              I was able to get some of the apps in Ryan Rutan's jive-sdk-java-jersey project to at least appear in the Apps drop-down, so I'm sure it's something that I'm doing wrong.  When I get it dialed down to what the problem is, I'll [try to remember to] post the answer.

               

              One thing that I think might be a bug is that if the meta.json's "name" property is defined in an i18n properties file, the OAuth grant permission page (<jive_instance>/oauth2/authorize) does not replace the key with the value from the properties file.  So, the Grant Permission message would say "addon.name" in it rather than replacing it with the value from the properties file.

                • Re: Has anyone successfully created an app in a Jive add-on??
                  cgum

                  I think the ultimate problem was a bad App.xml file, although it would be nice if there were a way to diagnose the problem more on the server-side – like if the Add-on install process could log somewhere that you could access from the Add-ons management page.

                   

                  My definition.json ended up looking like:

                  {

                    "integrationUser": {},

                    "osapps": [{

                         "name": "sample-app",

                         "id": "09f11d6b-b762-49d6-ae1d-d4398abc7781",

                         "url": "%serviceURL%/app/app.xml",

                         "appPath": "sample-app"

                    }]

                  }

                   

                  My app.xml file looked like this:

                  <Module specificationVersion="1">

                    <ModulePrefs title="Sample App"

                                description="Sample App Description"

                                author="Me"

                                authoraffiliation="My Company"

                                authoremail="me@mycompany.com">

                   

                    <Link rel="favicon"    href="images/icon16.png" />

                    <Link rel="Icon"       href="images/icon16.png" />

                    <Link rel="MediumIcon" href="images/icon48.png" />

                    <Link rel="LargeIcon"  href="images/icon128.png" />

                   

                    <!-- Commonly used features -->

                    <Require feature="dynamic-height" />

                    <Require feature="dynamic-width" />

                    <Require feature="jive-core-v2" />

                    <Require feature="jquery-1.6" />

                    <Require feature="osapi"/>

                    <Require feature="settitle"/>

                    <Require feature="views" />

                    <Require feature="setprefs" />

                    <Require feature="embedded-experiences"/>

                    <Require feature="selection" />

                    <Require feature="oauthpopup" />

                    <Require feature="jive-core-v2" />

                    <Require feature="jive-core-v3"/>

                    <Require feature="minimessage"/>

                   

                    </ModulePrefs>

                   

                    <Content type="html" view="canvas" href="canvas.html" preferred_height="400" />

                   

                  </Module>

                  • Re: Has anyone successfully created an app in a Jive add-on??
                    One thing that I think might be a bug is that if the meta.json's "name" property is defined in an i18n properties file, the OAuth grant permission page (<jive_instance>/oauth2/authorize) does not replace the key with the value from the properties file.  So, the Grant Permission message would say "addon.name" in it rather than replacing it with the value from the properties file.

                    I am seeing the same. Ryan Rutan can you verify this?

                • Re: Has anyone successfully created an app in a Jive add-on??

                  Casey Gum,

                  Where are you running into issues? Have you looked at the todo example in the jive-sdk? That has an app in it and you should just be able to get that up and running out of the box and use that as your template.

                  • Re: Has anyone successfully created an app in a Jive add-on??

                    Mark Weitzel Ryan Rutan

                     

                    I'm seeing a strange issue with my add-on app.

                     

                    I'm running Jive at localhost:8080.  The app is currently running on localhost:3000.  It is a node.js app that works beautifully when not accessing it through Jive.


                    The node app's html page loads a few javascript and css.  When I access the app through a jive add-on page, the css/javascript relative urls are changed:

                     

                    This is what is loaded normally in the node app HTML file.

                    <link href="css/lib/bootstrap.min.css" rel="stylesheet">

                    <script src="js/lib/angular.min.js"></script>

                    <script src="js/app.js"></script>

                    <script src="js/services/FormService.js"></script>

                    <script src="js/controllers/FormController.js"></script>

                     

                    This is what Jive is trying (and failing via 404) to load when accessing the node app via the Jive add-on:

                     

                    http://localhost:8080/gadgets/css/lib/bootstrap.min.css


                    Any thoughts on what is going on with the URL and why Jive is transforming it?  Since the loaded files are 404ing, the app is effectively broken.  What is with the gadget prefix?  Is Jive trying to proxy the call to the app?

                     

                    My definition json looks like this:

                     

                    {

                      "integrationUser": {},

                      "osapps": [{

                           "name": AppOfDoom",

                           "id": "09f11d6b-b762-49d6-ae1d-d4398abc7781",

                           "url": "%serviceURL%/app.xml",

                           "appPath": ""

                      }]

                    }

                     

                    My app.xml looks like this:

                     

                    <?xml version="1.0" encoding="UTF-8"?>

                    <Module specificationVersion="1">

                      <ModulePrefs title="Form App Test" description="Test run of Custom Form App" author="Dan Bucholtz" author_affiliation="7Summits" author_email="contact@7summitsagency.com">

                     

                     

                        <!-- Commonly used features -->

                        <Require feature="dynamic-height" />

                        <Require feature="minimessage" />

                        <Require feature="jive-core-v3" />

                        <Require feature="jquery-1.6" />

                        <Require feature="osapi"/>

                        <Require feature="settitle"/>

                        <Require feature="views" />

                     

                     

                     

                     

                        <!-- Icons: 3 sizes, 16x16, 48x48, 128x128 -->

                        <Link rel="Icon"       href="assets/icon16.png" />

                        <Link rel="MediumIcon" href="assets/icon48.png" />

                        <Link rel="LargeIcon"  href="assets/icon128.png" />

                     

                     

                      </ModulePrefs>

                     

                      <Content type="html" view="home" href="/" />

                      <Content type="html" view="canvas" href="/" />

                     

                     

                    </Module>

                     

                    Thanks!

                    Dan