3

I am receiving this message when attempting to run the "java sample" from the Streaming API developer guide. However the permission seems enabled (both "Streaming API" on the User Interface screen, and "API Enabled" on the user profile). The VisualForce sample from the developer guide works fine.

The exact messages that I am getting from the java client are:

[CHANNEL:META_HANDSHAKE]: {"ext":{"replay":true},"minimumVersion":"1.0","clientId":"3l11imnuap2iezf81klovv6lpf0rj","supportedConnectionTypes":["long-polling"],"channel":"/meta/handshake","id":"1","version":"1.0","successful":true} Subscribing for channel: /topic/PGProjects Waiting for streamed data from your organization ... [CHANNEL:META_SUBSCRIBE]: {"clientId":"3l11imnuap2iezf81klovv6lpf0rj","channel":"/meta/subscribe","id":"4","subscription":"/topic/PGProjects","error":"401::Cometd streaming permission not enabled for organization {00D3C000000Gz3A}","successful":false} Error during SUBSCRIBE: 401::Cometd streaming permission not enabled for organization {00D3C000000Gz3A} Exiting...

Any help would be greatly appreciated.

Update: SF techs were not able to help, but this seems to be an issue with the API version 37+. We updated the app to use version 36 and it fixed it. Still would like to know if anyone ran into this and has a solution for API version 38.

  • 1
    Have you run through the other prerequisites? In particular the PushTopic permissions. Can you see the PushTopic records via the API? – Daniel Ballinger Nov 28 '16 at 0:12
  • 1
    Does the PGProjects PushTopic exist in the target Org? – Daniel Ballinger Nov 28 '16 at 0:19
  • Yes - it exists and is visible through the API. In fact the other sample from the guide (the interactive visualforce page) works fine. – Nicolas Galler Nov 28 '16 at 12:32
  • Just to rule it out. Are you using the same user credentials in the Java app? Is it connecting to the same org (00D3C000000Gz3A)? How are you establishing the Java Session Id? – Daniel Ballinger Nov 28 '16 at 19:23
  • 1
    Yes same credentials - it is really just using the sample code from the developer guide... other than the username, password and login endpoint URL, the only thing I changed was the topic name. I can run a query and validate that it is pulling the records from that org. Tried the exact same code in another org and it worked fine, but I can't figure out what is different in this org... time to open a ticket I guess! – Nicolas Galler Nov 29 '16 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.