Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Subscribing Platform Event in Salesforce Community Site(Experience Cloud) #4

Open
Daniel-Deepak-Dev opened this issue May 18, 2021 · 3 comments

Comments

@Daniel-Deepak-Dev
Copy link

Daniel-Deepak-Dev commented May 18, 2021

Hi @TheVishnuKumar ,
I was trying to subscribe the platform event in aura component place in a Community Site. I am getting an unsupported error.
Could you please give us any solution?

Same happened, even If I use LWC. The problem must be with the Community Site.

aura_proddebug.js:55762 WARNING: Unsupported long-polling,callback-polling method: toJSON. Returning undefined

Error Response is

{
  "error": {
    "id": "1",
    "successful": false,
    "channel": "/meta/handshake",
    "failure": {
      "reason": "Not Found",
      "httpCode": 404,
      "connectionType": "long-polling",
      "transport": {},
      "message": {
        "id": "1",
        "version": "1.0",
        "minimumVersion": "1.0",
        "channel": "/meta/handshake",
        "supportedConnectionTypes": ["long-polling", "callback-polling"],
        "advice": { "timeout": 60000, "interval": 0 }
      }
    }
  }
}
@TheVishnuKumar
Copy link
Owner

Does your community profile have access to Push Topic?
Based on this thread, the Community can not have access to push topics. https://salesforce.stackexchange.com/questions/129164/getting-streaming-or-alternative-to-work-for-customer-community-user-profiles

@ChiragDhangar07
Copy link

@TheVishnuKumar @Daniel-Deepak-Dev
Any solution ? how to subscribe platform event in lwc for community sites. I tried both emapi and cometD but success messages are coming but not subscribing the events

@chasd00
Copy link

chasd00 commented May 9, 2022

There's an issue with cometd that's included in this component. I'm not sure if a new version of salesforce surfaced the issue or not. Unzip the static resource and look in cometd.js at line 621 where it says

this._debug('Could not copy transport context into XHR', e);

The problem is the "this" keyword is clobbered by the function and so _debug is not defined. Just comment out the line leaving the catch block empty.

I submitted a pull request to cometd to fix it the right way
cometd/cometd#1178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants