7 Replies Latest reply on Nov 4, 2016 9:51 AM by Ryan Rutan

    change the AppID to human friendly name

    gopi.gorantala

      Hi Ryan Rutan Rashed Talukder

       

      Is there a way to change the AppID to a human friendly name in the URL for Jive canvas App ?

       

      -Gopi.

        • Re: change the AppID to human friendly name
          Ryan Rutan

          Gopi,

           

          In order to set the appPath, you have to define it in your Add-On's definition.json on the 1st install of the APP UUID. 

           

          If you are using the Jive-SDK, you can update your apps local definition.json file, such as this:

          jiveapps/definition.json at master · jivesoftware/jiveapps · GitHub

           

          And the SDK will bundle those values into the generated /definition.json in the add-on.

           

          If you've already deployed your Add-On with an app, you'll need to generate a change the APP UUID (and possibly the add-on ID, can't remember off the top of my head) for the system to register the appPath correctly.  Once registered, no other app can have that path, so it is recommended to make them somewhat qualifying/unique vs. generic and vague.

           

          Hope that helps.

            • Re: change the AppID to human friendly name
              gopi.gorantala

              Thanks Ryan, will give it a try Monday morning !

                • Re: change the AppID to human friendly name
                  gopi.gorantala

                  Hi Ryan Rutan

                   

                  I added  "appPath" : "somename" in definition.json file and after building the add-on, I can see the updated appPath name in extension zip file, but when I deploy the add-on it throws database error.

                   

                  If i remove the appPath attribute and deploy the add-on, it works fine.

                   

                   

                  Problems encountered while installing client app: ORA-00001: unique constraint (JIVEUSER.SYS_C00988960) violated

                   

                  com.jivesoftware.base.database.dao.DAOException: Object AppImpl{id=-1, internalName=appName, appUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, appPath=somename, systemLicenseURL=extension://apps/appName/app.xml, developerApp=false, gadgetHash=null, refreshState=NEVER, extensionUUID=SOME ID, installType=PRE_INSTALL, appInstallOrigin=EXTENSION} could not be inserted into the database.

                   

                  -Gopi.

                    • Re: change the AppID to human friendly name
                      Ryan Rutan

                      ?appPath needs to be set on the 1st install of an add-on/app.  This means that you need to update the app UUID and add-on UUID to a new ID and then deploy it...and it should work fine.

                       

                       

                      Hope that helps.

                        • Re: change the AppID to human friendly name
                          gopi.gorantala

                          Thanks Ryan Rutan, this approach worked for me.

                           

                          -Gopi.

                            • Re: change the AppID to human friendly name
                              gopi.gorantala

                              Hi Ryan Rutan, Rashed Talukder

                               

                              I deployed an add-on with appPath:"somename", which works fine.

                               

                              And now, there were few new features,enhancements I added to the add-on and now the appID & add-on ID changed but the appPath remains same in my apps/appName/definition.json file. When I deploy its not working and throwing some Jive PrimaryKey errors.

                               

                              But, if I change the "appPath" value in apps/appName/definition.json file to a new value then it works.  My question is I don't wanna change the appPath value for each deployment. Is this a Jive Bug or I'm I missing something?

                               

                               

                              Problems encountered while installing client app: ORA-00001: unique constraint (JIVEUSER.SYS_C00336416) violated

                              com.jivesoftware.base.database.dao.DAOException: Object AppImpl{id=-1, internalName=addon-name...

                               

                              Steps to test this:

                              1. Deploy an add-on which has a valid name in the definition.json

                              2. Now, generate a new appID and addonID for the same app without touching the definition.json

                              3. deploy it

                               

                               

                              -Gopi.

                                • Re: change the AppID to human friendly name
                                  Ryan Rutan

                                  If you are using the Jive SDK, (Getting Started with the Jive Node SDK)...make sure that you are setting you add-on ID in the jiveclientconfiguration.json

                                   

                                  Also, if you are purging your /db folder and somehow purging the definition.json in your /apps/[YOUR_APP] folder then the SDK creates a new one for you.

                                   

                                  As long as you dont purge these stores, the SDK will preserve the UUID for Apps/Add-ons, but if you remove 1 or all of them as part of a clean process (and/or spinning up in a new directory)...you will need to go back and reset the IDs to the originals one associated with your appPath.  The reason you have to always match ID to /appPath is due to the fact that we do not allow /appPath hijacking.  Once it's set..it is set.  Arguments can be made that we need better ways for purging these appPaths out of the system, but this hasn't been an issue in the past.

                                   

                                  I hope that helps.

                                  1 person found this helpful