AnsweredAssumed Answered

Can't detect the context of an app page

Question asked by Jonathan Block on May 19, 2017
Latest reply on May 22, 2017 by Jonathan Block

I'm developing a Jive app using an external server as middleware to display the appropriate app pages.  The display is initially proxied through Jive's servers, long enough to determine the correct context and current user, before redirecting to load subsequent pages directly from the remote server.  I have most of that mechanism working, but the context detection is coming up empty.


Here's a slightly-sanitized version of my app.xml, which may well be overloaded for what I actually need:

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

<Module specificationVersion="1"> 

  <ModulePrefs title="Credentials" 

               description="This app adds blah blah blah." 

               author="Jonathan Block" 



    <!-- Commonly used features --> 

    <Require feature="dynamic-height" /> 

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

    <Require feature="osapi"/> 

    <Require feature="settitle"/> 

    <Require feature="views" /> 

    <Require feature="opensocial" /> 

    <Require feature="opensocial-data" /> 

    <Require feature="setprefs" /> 

    <Optional feature="minimessage" /> 

    <Optional feature="locked-domain"/> 

    <Optional feature="oauthpopup"/> 

    <Optional feature="dynamic-width" /> 

    <Optional feature="embedded-experiences"/> 

    <Optional feature="selection"/> 

    <Optional feature="open-views"/> 

    <Optional feature="firebug-lite"/> 

    <Optional feature="content-rewrite"/>

    <Optional feature="actions"> 

      <Param name="action-contributions"> 


             <action id=""




                     icon="" />

             <action id=""




                     icon="" />




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

    <Link rel="Icon"       href="" /> 

    <Link rel="MediumIcon" href="" /> 

    <Link rel="LargeIcon"  href="" /> 


  <Content type="html" view="credentials,canvas" href="" preferred_height="500" /> 



Here's the content for the page that loads initially, which is proxied through Jive:


<script type='text/javascript'>

  var page_type;

  var page_id;


  function detect() {

    osapi.jive.core.container.getLaunchContext(function (resp) {

      page_type = resp.jive.content.type;

      page_id =;





  function identify() {

    var payload = {

      'href': '' + page_type + '&page_id=' + page_id,

      'format': 'json',

      'authz': 'signed',

      'headers': {'content-type': ['application/json']}




        document.location = response.content.url;







I can confirm that everything in this initial page is functional, except for the code inside the osapi.jive.core.container.getLaunchContext anonymous callback.  The resp variable is coming back as null.  I've been stabbing at this for a while now, and I just can't explain why that result would be empty.


I'd appreciate any help you can offer.