Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

"No stream to display" error on clicking any button

SA-15628

Summary



"No stream to display " error displays sporadically to users in production.


Error Messages



No stream to display


Steps to Reproduce



There is no specific use case to replicate this behavior.


Root Cause



Some of the parameters (Purpose , Harness and TaskAction) of FinishAssignment activity is passed to server. 

Resolution



Mention the below code in UserWorkForm rule.

<script>

// AJAX error handling function
function ajaxRequestFail(respObject)
{
    var statusCode = respObject.status;

    // use statusCode in your alert message
    alert("["+statusCode+"] A communication error has occurred.  Please press ok and try again.");

}

pega.util.Connect.ajaxFailureSecondaryCount = -1;
/*How many times to retry, 2 is enough (value of 1)*/
pega.util.Connect.ajaxFailureCount = 1;
pega.util.Connect.ajaxParams = new Hashtable();
/*default timeout in miliseconds - 120 seconds */
pega.util.Connect.ajaxTimeout = 120000;


var orig;
if(!orig)
orig = pega.util.Connect.asyncRequest;

pega.util.Connect.asyncRequest = function(method, uri, callback, postData)
{


if (!callback) {
            callback = {};
        }
        
var orig1;
if(!orig1)
orig1 = callback.success;        
callback.success = function (respObject) {
                pega.util.Connect.ajaxFailureSecondaryCount = -1;
                orig1.call(this,respObject);
                           }
var orig2;
if(!orig2)
orig2 = callback.upload;
callback.upload = function(respObject) {
                   pega.util.Connect.ajaxFailureSecondaryCount = -1;
                orig2.call(this,respObject);
           }
var orig3;
if(!orig3)
orig3 = callback.failure;           
callback.failure = function (respObject) {
                while(pega.util.Connect.ajaxFailureSecondaryCount > 0){        
                    pega.util.Connect.ajaxFailureSecondaryCount--;
                    return pega.util.Connect.asyncRequest(pega.util.Connect.ajaxParams['method'], pega.util.Connect.ajaxParams['uri'], pega.util.Connect.ajaxParams['callback'], pega.util.Connect.ajaxParams['postData']);                    
                }
                if(window.ajaxRequestFail){
                    try {                    
                        ajaxRequestFail(respObject);
                    } catch(e) {
                    }
                }
                orig3.call(this,respObject);
                        }


pega.util.Connect.ajaxParams['method'] = method;
        pega.util.Connect.ajaxParams['uri'] = uri;
        pega.util.Connect.ajaxParams['callback'] = callback;
        pega.util.Connect.ajaxParams['postData'] = postData;    
        if(pega.util.Connect.ajaxFailureSecondaryCount < 0 && pega.util.Connect.ajaxFailureCount!=0){
            pega.util.Connect.ajaxFailureSecondaryCount = pega.util.Connect.ajaxFailureCount;
        }
                  
                  /*set default callback timeout*/
                  if (pega.util.Connect.ajaxTimeout > 0) {
                     callback.timeout = pega.util.Connect.ajaxTimeout;
                  }



orig.call(this,method, uri, callback, postData);
}
pega.util.Connect.handleTransactionResponse = function(o, callback, isAbort)
    {

        var httpStatus, responseObject;
        var args = (callback && callback.argument)?callback.argument:null;

        try
        {
            if(o.conn.status !== undefined && o.conn.status !== 0){
                httpStatus = o.conn.status;
            }
            else{
                httpStatus = 13030;
            }
        }
        catch(e){


             // 13030 is a custom code to indicate the condition -- in Mozilla/FF --
             // when the XHR object's status and statusText properties are
             // unavailable, and a query attempt throws an exception.
            httpStatus = 13030;
        }


        if(httpStatus >= 200 && httpStatus < 300 || httpStatus === 1223){
            responseObject = this.createResponseObject(o, args);
            if(callback && callback.success){
                if(!callback.scope){
                    callback.success(responseObject);
                }
                else{
                    // If a scope property is defined, the callback will be fired from
                    // the context of the object.
                    callback.success.apply(callback.scope, [responseObject]);
                }
            }

            // Fire global custom event -- successEvent
            this.successEvent.fire(responseObject);

            if(o.successEvent){
                // Fire transaction custom event -- successEvent
                o.successEvent.fire(responseObject);
            }
        }
        else{
            switch(httpStatus){
                // The following cases are wininet.dll error codes that may be encountered.
                case 12002: // Server timeout
                case 12029: // 12029 to 12031 correspond to dropped connections.
                case 12030:
                case 12031:
                                     case 12007:
                case 12152: // Connection closed by server.
                case 13030: // See above comments for variable status.
          responseObject = this.createExceptionObject(o.tId, args, (isAbort?isAbort:false));
                    if(callback && callback.failure){
                        if(!callback.scope){
                  callback.failure(responseObject);
                        }
                        else{
                  callback.failure.apply(callback.scope, [responseObject]);
                        }
                    }

                    break;
                default:
                    responseObject = this.createResponseObject(o, args);
                    if(callback && callback.failure){
                        if(!callback.scope){
                  callback.failure(responseObject);
                        }
                        else{
                  callback.failure.apply(callback.scope, [responseObject]);
                        }
                    }
            }

            // Fire global custom event -- failureEvent
            this.failureEvent.fire(responseObject);

            if(o.failureEvent){
                // Fire transaction custom event -- failureEvent
                o.failureEvent.fire(responseObject);
            }

        }

        this.releaseObject(o);
        responseObject = null;
    }
</script>

 

Published October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us