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
KzieniksKzieniks 

Streaming API connect fails

I've used the javascript example as an base to serve a Visualforce page with streaming API enabled.

With a few modifications on the example everything is the same.

 

I get error's on the connect command and then it gets into an endless handshake/connect loop.

The response in firefox console is saying 'unknown client':

 

[{"channel":"/meta/connect","advice":{"reconnect":"handshake","interval":500},"error":"402::Unknown client","successful":false,"id":"3"}]



i've tried different browsers and even different versions of cometd distribution ( 2.1.0 and 2.3.0 instead of 2.2.0 given in example )

 

When I subscribe to the topic with the workbench everything just works fine. Is it because i'm serving the listeners in VF ? or is the combinitation with Jquery.comet?

Best Answer chosen by Admin (Salesforce Developers) 
alextalext

Could you please check this again? We may have addressed the issue.

 

If the issue persist, could you share which instance you are using (e.g. NAx) ?

 

Thank you,

 

--alex

All Answers

sdetweilsdetweil

see topic "connect/handshake loop in javascript sample"

KzieniksKzieniks
Still it's weird, the demo in the webinar is working like it should.

Ok, let's wait until more info from the Api team.
Thanks
alextalext

We have our network team reviewing the issue.

 

Will post an update as we get feedback.

 

Regards,

 

--alex

alextalext

Could you please check this again? We may have addressed the issue.

 

If the issue persist, could you share which instance you are using (e.g. NAx) ?

 

Thank you,

 

--alex

This was selected as the best answer
KzieniksKzieniks

It works now!

 

Thanks for the feedback

alextalext

Excellent. Apologies for the delay.

 

Please keep us posted on your progress and likes/deslikes.

 

Thank u!

 

--alex

Chirag MehtaChirag Mehta

Are you able to successfully run the visualforce listener? if yes, can you please post your VF code here. 

 

I'm facing issues when trying to run Visualforce example (as mentioned in the streaming api pdf / wiki article)

 

I've logged my error @ http://boards.developerforce.com/t5/Streaming-API-Developer-Preview/Error-trying-to-do-the-Visualforce-sample-of-Streaming-Api/m-p/357569/message-uid/357569/highlight/true#U357569