Skip to content

JS Realtime SDK Presence Callback Never Executed #1832

@CameronSumpter

Description

@CameronSumpter

Using the JS Realtime SDK v2.3.0, it seems that the callback function is never executed; the Documentation indicates that it should be called on both success and failure.

Steps to Reproduce:

Given an existing channel which has already been subscribed to, this snippet establishes presence but does not generate console output when it should:
channel.presence.enter({}, function(err){ console.log(🎉); });

Changing the data payload to an invalid data type to force an error causes a Error: Data type is unsupported exception instead of executing the callback function, as in:
channel.presence.enter(0, function(err){ console.log(err); });

Workaround:

Chaining a promise works as expected, as in:

channel.presence.enter().then(
  function() { console.log('🎉'); },
  function(err) { console.log(err); }
);

┆Issue is synchronized with this Jira Task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to public interface documentation (API reference or readme).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions