[Problem/Question]
// Detailed description of issue.
I got this error on production but it’s all fine on local.
__bundle-37ef7b1b.js:1 Uncaught (in promise) Error: Collection is not ready due to an error during initialization.
at new e (__bundle-37ef7b1b.js:1:128042)
at Function.get (__bundle-37ef7b1b.js:1:130790)
at t.collection (__bundle-37ef7b1b.js:1:207410)
at e.get (__bundle-37ef7b1b.js:1:210117)
at e.get (__bundle-37ef7b1b.js:1:210324)
at e.<anonymous> (__bundle-37ef7b1b.js:1:214185)
at __bundle-fa3d315f.js:1:2257
at Object.next (__bundle-fa3d315f.js:1:2361)
at __bundle-fa3d315f.js:1:1278
When I log collection
object to browser console I still seeing it (it’s not undefined):
one of the code where error above occur is when method on collection object get called
e.g: collection.hasMore()
const collection = sb.groupChannel.createGroupChannelCollection({
filter: groupChannelFilter,
order: GroupChannelListOrder.LATEST_LAST_MESSAGE,
});
collection.hasMore()
// If problem, please fill out the below. If question, please delete.
[SDK Version]
// What version of the SDK are you using?
“@sendbird/chat”: “^4.10.1”,
“@sendbird/uikit-react”: “^3.7.0”,
[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.
It’s just normal setup flow.
it seems to happens with
const user = await sb.connect(userId, sessionToken);
and
const collection = sb.groupChannel.createGroupChannelCollection({
filter: groupChannelFilter,
order: GroupChannelListOrder.LATEST_LAST_MESSAGE,
});
collection.hasMore()
[Frequency]
// How frequently is this issue occurring?
it always happens on production
[Current impact]
// How is this currently impacting your implementation?
it makes the call to collection.loadMore()
failed.
let moreChannels = await collection.loadMore();
We have user that have more than 100 group channel which make him can not chat to other end on group channel