3.1.0 issue & question

Hello,

You just released v3.1.0.

Firstly, the minified file in the npm package seems to have a new dependency of the ‘dns’ npm package?

This dependency was not found:                                                                                                                            
* dns in ./node_modules/sendbird/SendBird.min.js                                                                                                          
To install it, you can run: npm install --save dns

Why is this and why isn’t it documented? ‘dns’ is not listed as a dependency in package.json.

Secondly, you introduced a new localCacheEnabled parameter to the SendBird constructor. Looking briefly through the code, this seem like a breaking change, or at least something to be aware about. Yet I don’t see any documentation anywhere? The parameter isn’t mentioned anywhere in the docs either.

Also, does this new cache functionality been tested for compatibility with SyncManager? I can imagine some conflicts if both the SendBird SDK and the SyncMaster SDK are fighting each other about being the best one to cache :slight_smile:

1 Like

Hi @mmilo,

dns is a built in node API. There is no need for it be listed in the package.json.
https://nodejs.org/api/dns.html#dnslookuphostname-options-callback

I updated to 3.1.0 in my own personal project and have no run into any errors. What version of node do you have installed?

In regards to localCache, this is a new feature that is just been released in 3.1.0. It will be replacing SyncManager and SyncManager will be deprecated. More documentation and announcement information to come.

Documentation has been released for JavaScript here: Local caching | Chat JavaScript SDK | Sendbird Docs

Hi @Tyler,

Unfortunately the dependency on the dns Node API breaks the ability to use sendbird on ReactNative. (The API does not exist).

Was this an intentional break? How can we continue to use sendbird + ReactNative?

Thanks!

Hey @Reagan,

Let me connect with our Engineering team to discuss.

Hi all,

We’ve released V3.1.1 that should resolve this dns issue. Please give it a try and report back if you run into any issues with it.

Sounds good, can confirm dns dependency isn’t an issue anymore.

You should look through the new local caching docs though, already found an issue that one probably wouldn’t know how to fix, if not looking at the typescript interface.

var groupChannelCollection = sb.GroupChannel.createChannelCollection()

Should be sb.GroupChannel.createGroupChannelCollection() and since it isn’t being redeclared you should set it as a const instead :slight_smile:

1 Like

Thank you @mmilo We will update this ASAP!

1 Like

Local caching isn’t working at all for us – we are using v3.1.1 and running the JS SDK in our react-native app. sendbird.connect just returns “Store is not available. Check your environment settings.”. Using SyncManager, we had to set the store to AsyncStorage. There must be a similar API for local caching, no?

1 Like

Also running into the same issue. On iOS sendbird.connect just returns “Store is not available. Check your environment settings.”

@Liam_Cho is the intention to support react-native local caching? And if so, is there a timeline you could share with us? We’d like to know before we migrate our chat system from syncmanager (which has been unreliable) to local caching. Thank you!