1

I am working on CometD jQuery client, which works with different channels. I am trying to to listen messages from cometd server on the channels after publishing a message but not able to receive any message on a subscribed channel (The callback of the subscribe does not execute).

Note : Its working fine with GC, FF and IE10 onwards. Any help will be appreciated! Thanks in advance:) Log :

LOG: 20:53:53.064Transportlong-pollingreset 
LOG: 20:53:53.064Transportcallback-pollingreset 
LOG: 20:53:53.064New advice[object Object] 
LOG: 20:53:53.064Initial transport islong-polling 
LOG: 20:53:53.064Statusdisconnected->handshaking 
LOG: 20:53:53.064Handshake sent[object Object] 
LOG: 20:53:53.064Send[object Object] 
LOG: 20:53:53.064Transportlong-pollingsending request1envelope[object Object] 
LOG: 20:53:53.064Transportlong-pollingreceived errorerrorNo Transport 
LOG: 20:53:53.065Transportlong-pollingwaiting at most10000ms for the response, maxNetworkDelay10000 
LOG: 20:53:53.071Addingsubscriptionon/channel-1 with scopeundefinedand callbackfunction _handlerUserSession(message) {


    } 
LOG: 20:53:53.071Addedsubscription[object Object] 
LOG: 20:53:53.122Invoking timed functionfunction()
                        {
                            self.transportFailure(envelope, request, failure);
                        } 
LOG: 20:53:53.123handleFailure[object Object][object Object][object Object] 
LOG: 20:53:53.123Transportlong-polling->callback-polling 
LOG: 20:53:53.123Function scheduled in1000ms, interval =0backoff =1000function()
        {
            _handshake(_handshakeProps, _handshakeCallback);
        } 
LOG: 20:53:54.126Invoking timed functionfunction()
        {
            _handshake(_handshakeProps, _handshakeCallback);
        } 
LOG: 20:53:54.126Removedsubscription[object Object] 
LOG: 20:53:54.126New advice[object Object] 
LOG: 20:53:54.126Initial transport iscallback-polling 
LOG: 20:53:54.126Handshake sent[object Object] 
LOG: 20:53:54.126Send[object Object] 
LOG: 20:53:54.126Transportcallback-pollingsending request1envelope[object Object] 
LOG: 20:53:54.128Transportcallback-pollingwaiting at most10000ms for the response, maxNetworkDelay10000 
LOG: 20:53:54.349Received[object Object] 
LOG: 20:53:54.349New advice[object Object] 
LOG: 20:53:54.349Send[object Object] 
LOG: 20:53:54.349Transportcallback-pollingsending request2envelope[object Object] 
LOG: 20:53:54.350Transportcallback-pollingwaiting at most10000ms for the response, maxNetworkDelay10000 
LOG: 20:53:54.350Statushandshaking->connecting 
LOG: 20:53:54.350Function scheduled in200ms, interval =200backoff =0function()
        {
            _connect();
        } 
LOG: 20:53:54.564Received[object Object],[object Object] 
LOG: 20:53:54.573Invoking timed functionfunction()
        {
            _connect();
        } 
LOG: 20:53:54.573Connect sent[object Object] 
LOG: 20:53:54.573Send[object Object] 
LOG: 20:53:54.573Transportcallback-pollingmetaConnect send, request3envelope[object Object] 
LOG: 20:53:54.573Transportcallback-pollingsending request3envelope[object Object] 
LOG: 20:53:54.575Transportcallback-pollingwaiting at most40000ms for the response, maxNetworkDelay10000 
LOG: 20:53:54.575Statusconnecting->connected 
LOG: 20:53:54.788Transportcallback-pollingmetaConnect complete, request3 
LOG: 20:53:54.788Received[object Object],[object Object],[object Object] 
LOG: 20:53:54.788New advice[object Object] 
LOG: 20:53:54.788Statusconnected->connecting 
LOG: 20:53:54.788Function scheduled in200ms, interval =200backoff =0function()
        {
            _connect();
        } 
LOG: 20:53:54.788Handling remote call response for[object Object]with contextundefined 
LOG: 20:53:54.788Handling remote call response for[object Object]with contextundefined 
LOG: 20:53:54.999Invoking timed functionfunction()
        {
            _connect();
        } 
LOG: 20:53:54.999Connect sent[object Object] 
LOG: 20:53:54.999Send[object Object] 
LOG: 20:53:54.999Transportcallback-pollingmetaConnect send, request4envelope[object Object] 
LOG: 20:53:55.000Transportcallback-pollingsending request4envelope[object Object] 
LOG: 20:53:55.002Transportcallback-pollingwaiting at most40000ms for the response, maxNetworkDelay10000 
LOG: 20:53:55.002Statusconnecting->connected 
LOG: 20:54:05.509Transportcallback-pollingmetaConnect complete, request4 
LOG: 20:54:05.509handleFailureundefined[object Object][object Object] 
LOG: 20:54:05.509Statusconnected->connecting 
LOG: 20:54:05.509Function scheduled in200ms, interval =200backoff =0function()
        {
            _connect();
        } 
LOG: 20:54:05.714Invoking timed functionfunction()
        {
            _connect();
        } 
LOG: 20:54:05.714Connect sent[object Object] 
LOG: 20:54:05.714Send[object Object] 
LOG: 20:54:05.714Transportcallback-pollingmetaConnect send, request5envelope[object Object] 
LOG: 20:54:05.714Transportcallback-pollingsending request5envelope[object Object] 
LOG: 20:54:05.717Transportcallback-pollingwaiting at most40000ms for the response, maxNetworkDelay10000 
LOG: 20:54:05.717Statusconnecting->connected 
LOG: 20:54:06.136Transportcallback-pollingmetaConnect complete, request5 
LOG: 20:54:06.136Received[object Object] 
LOG: 20:54:06.136Statusconnected->connecting 
LOG: 20:54:06.136Function scheduled in200ms, interval =200backoff =0function()
        {
            _connect();
        } 
GMCS Pune
  • 83
  • 1
  • 14
  • [Client-side logs](http://docs.cometd.org/3/reference/#_troubleshooting_logging_javascript) ? – sbordet Jul 14 '15 at 12:03
  • @sbordet Thanks ! I tried this but there are no logs on the console IE 9. On GC I am getting the logs. – GMCS Pune Jul 14 '15 at 13:58
  • It's a IE 9 limitation. You can work it around by replacing the `window.console` methods, see for example http://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function. – sbordet Jul 15 '15 at 09:44
  • @sbordet Here is the log : – GMCS Pune Jul 17 '15 at 16:49
  • The line `LOG: 20:53:53.064Transportlong-pollingreceived errorerrorNo Transport` seems to be a jQuery message about transport failure for cross domain XHR requests. Did you configure CORS correctly on your server ? Please consider joining the [CometD mailing list](https://groups.google.com/forum/#!forum/cometd-users) for further troubleshotting, here is not the ideal place. – sbordet Jul 25 '15 at 15:08

0 Answers0