function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sdetweilsdetweil 

connect/handshake loop in javascript sample

I get the following with the sample  VF page displayed.

but no notification from the puhstopic. 

 

sual.force.com/cometd/handshake
200 OK
60ms
jquery (line 7306)
200 OK
52ms
jquery (line 7306)
 
200 OK
83ms
jquery (line 7306)
200 OK
57ms
jquery (line 7306)
200 OK
68ms
jquery (line 7306)
200 OK
49ms
jquery (line 7306)
200 OK
74ms
jquery (line 7306)
200 OK
57ms
jquery (line 7306)
200 OK
63ms
jquery (line 7306)
200 OK
60ms
jquery (line 7306)
200 OK
60ms
jquery (line 7306)
200 OK
59ms
jquery (line 7306)
200 OK
65ms
jquery (line 7306)
200 OK
57ms



Best Answer chosen by Admin (Salesforce Developers) 
sdetweilsdetweil

works for me as well..

 

Sam

All Answers

bob_buzzardbob_buzzard

I'm seeing exactly the same thing - I was just about to post up my findings.

 

I'm on the na11 instance.  I've commented out the subscription and just left the init call in there.  I've also added listeners to the bayeux meta channels, and I can see that the handshake is successful and returns a client id, but as soon as the connect is attempted the server returns a 402::unknown client, with a recommendation to do the handshake again.  The handshake is successful as above, returns a new client id and the cycle continues:

 

Received message /meta/handshake

Successful = true
Version = 1.0
Client id = er1cv19ubs4rjygn1lw3xvqz489


Received message /meta/connect
Successful = false
Advice =
Reconnect: handshake
Interval: 500
Error = 402::Unknown client


Received message /meta/connect
Successful = false
Advice =
Reconnect: handshake
Interval: 500
Error = 402::Unknown client


Received message /meta/handshake
Successful = true
Version = 1.0
Client id = fc4wk1k9yh6zha1vmn7iyoscgr4


Received message /meta/connect
Successful = false
Advice =
Reconnect: handshake
Interval: 500

 

I've tried this on chrome, firefox and safari and each time I see the same results.  Reading the bayeux docs, they suggest that the client isn't responding to the connect in time, but I'm not seeing any lags. I've also checked my network connection and that looks okay.  According to one of the posts I've read, dropped connections can be seen if the server is under severe load.  This is happening throughout the day so load doesn't appear to be a major factor.

 

I'm not sure what I can do to progress this now - its all taking place server side :(

bob_buzzardbob_buzzard

I've just created a java client and that's working okay, so it seems to be something specific to the javascript/visualforce aspect of the mechanism

kganesankganesan

I am seeing this problem too. The api team is working to get this issue resolved when the page is served from visual force domain.

KzieniksKzieniks

As mentioned by Alext in this topic it should be solved.

In my org it is solved!

bob_buzzardbob_buzzard

Solved in my org too!  

sdetweilsdetweil

works for me as well..

 

Sam

This was selected as the best answer
sdetweilsdetweil

I'm having trouble with the sample java client.. keep getting invalid_client_id..  any tricks? you seem to have been successful

 

Sam