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
Maria ShumeykoMaria Shumeyko 

Exception during handling of messages Unrecognized advice action handshake

Hi everyone! I completed the trailhead module "Build an Instant Notification App". My code was successfully verified, bur after getting one notification message I get an error from cometd.js library (3.1.1 version):
 08:29:24.933 Exception during handling of messages Unrecognized advice action handshake     cometd:1332
Any ideas how to fix it or did somebody have the same issue?
Deepali KulshresthaDeepali Kulshrestha
Hi Maria,

If you notice an "Exception during handling of messages Unrecognized advice action handshake" error in your developer console, please turn off notifications for your org:

1.From Setup, enter Notifications in the Quick Find box, then select Salesforce Notifications.
2.Uncheck the Enable in-app notifications and Enable push notifications checkboxes.
3.Click Save.
4.Log out then log in again.

This happens because of a conflict between the CometD connection that your app is trying to establish and the connection used internally by Salesforce to track notifications.

This issue is now solved with the use of lightning:empApi and the Trailhead project has been update accordingly.
Read more about this component in this blog post

https://developer.salesforce.com/blogs/2018/10/building-real-time-lightning-apps-gets-even-simpler.html

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha