3 Replies Latest reply on Jan 20, 2015 5:06 PM by rpfeil

    pushURL empty when tile is registered.

    rpfeil

      Hi guys. I've been trying to get a full tile update cycle to work, and have been having a hard time. I've finally gotten stumped by an issue. When my tile registers the 'pushURL' entry is null. Without it I can't update the tile. Any ideas why?

       

      Some code snippets for context...


      JiveController.cs snippet

      // POST api/Jive/RegisterTile

      [Route("RegisterTile")]

      [HttpPost]

      public void RegisterTile(JiveTileRegistration tile)

      {

          System.Diagnostics.Trace.TraceInformation("RegisterTile");

          System.Diagnostics.Trace.TraceInformation(Newtonsoft.Json.JsonConvert.SerializeObject(tile));

          TileRegistrations.Add(tile.guid, tile);

      }

       

      trace info...

      2014-12-18T17:59:41 PID[8228] Information RegisterTile

      2014-12-18T17:59:41 PID[8228] Information {"guid":"community:sandbox.jiveon.com/tile:5019","remoteID":null,"config":null,"name":"Voice Storm","jiveUrl":"https://sandbox.jiveon.com","tenantID":"b22e3911-28ef-480c-ae3b-ca791ba86952","pushUrl":null,"code":"d6hlml743m3egdq8zw38w1xmxs4oadm9.c","accessToken":"","refreshToken":""}

       

      definition.json

      {

          "integrationUser": {

              "systemAdmin": false

          },

          "tiles": [

              {

                  "sampleData": {

                      "title": "Voice Storm",

                      "contents": [

                          {

                              "text": "Home Page",

                              "icon": "http://vsjiveazuretest.azurewebsites.net/Content/Jive/images/VoiceStorm16.png",

                              "action": {

                                  "text": "Home Page",

                                  "url": "https://public.dstb.us/User/LogOn?returnUrl=/&autoLogin=Jive"

                              },

                              "linkDescription": "Voice Storm Home Page"

                          }

                      ],

                      "config": {

                          "listStyle": "contentList"

                      }

                  },

                  "displayName": "Voice Storm",

                  "name": "Voice Storm",

                  "description": "Voice Storm Tile",

                  "style": "LIST",

                  "icons": {

                      "16": "%serviceURL%/Content/Jive/images/VoiceStorm16.png",

                      "48": "%serviceURL%/Content/Jive/images/VoiceStorm48.png",

                      "128": "%serviceURL%/Content/Jive/images/VoiceStorm128.png"

                  },

                  "action": "%serviceURL%/Content/Jive/action.html",

                  "published": "2013-02-28T15:12:16.768-0800",

                  "updated": "2013-02-28T15:12:16.768-0800",

                  "config": "%serviceURL%/Content/Jive/configTile.html",

                  "unregister": "%serviceURL%/api/Jive/UnregisterTile",

                  "register"  : "%serviceURL%/api/Jive/RegisterTile"

              }

          ],

          "templates": [],

          "osapps": [

              {

                  "name": "VoiceStorm App",

                  "id": "9d36ea1d-28c1-5612-92fc-7c3d473ae32f",

                  "appPath": "voicestormapp",

                  "url": "%serviceURL%/Content/Jive/app.xml"

              }

          ],

          "storageDefinitions": [],

          "jabCartridges": []

      }

        • Re: pushURL empty when tile is registered.

          At a high-level this looks correct.  Can you confirm that when you are configuring the Tile and save the config to the Tile instance, and then pressing Save?  I usually do this to make sure that I can differentiate between old requests that are retrying vs. new requests.  Putting a config value of "test" = "123" will let you confirm if the traffic you are seeing is coming from that instance of saving...or a previous one perhaps.  Hope that helps.

          • Re: pushURL empty when tile is registered.
            rpfeil

            It turns out that the field isn't named 'pushUrl', it's sent as 'url'. Please update the documentation.

            • Re: pushURL empty when tile is registered.
              rpfeil

              The documentation for tile registration is not correct.

               

              The field listed as 'pushUrl' in the tile registration JSON definition is actually being sent as 'url'. It seems like a small thing, but it's an especially difficult bug to fix. The way JSON deserialization works makes it look like no pushUrl is being sent. In C# it's doubly difficult because the resulting object won't have a url field either. WebAPI just throws out anything it can't match.

               

              This is the only place in the documentation I can find where pushUrl is referenced. A quick edit here can save a lot of lost time for your partners in the future.

              Jive Platform Data Flows and Sequence Diagrams (REST/JSON)