[Problem/Question]
Hi guys,
Using Javascript SDK we keep getting error
{error: true, message: “Not authorized. “User must be a member.”.”, code: 400108}
By looking at Dashboard We can confirm that both users are on same group channel
// Detailed description of issue.
On Javascript SDK I see error like below when openning channel:
Request URL:
{error: true, message: “Not authorized. “User must be a member.”.”, code: 400108}
Group channel id: sendbird_group_channel_187358046_2ea0f7745100ff932d07fc6d1012c24fc8cee6f0
// If problem, please fill out the below. If question, please delete.
[SDK Version]
// What version of the SDK are you using?
“@sendbird/chat”: “^4.9.12”,
“@sendbird/uikit-react”: “^3.6.8”,
[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.
The code We use for joining a channel:
const handleJoinChannel = async (channelUrl) => {
// console.debug("6.handleJoinChannel:: start load channel mesage collection", currentTime());
// updateState({ ...state, loading: true });
// console.info("handleJoinChannel fireeee")
if (state.messageCollection && state.messageCollection.dispose) {
state.messageCollection?.dispose();
}
if (state.currentlyJoinedChannel?.url === channelUrl) {
return null;
}
const { channels } = state;
const channel = channels.find((channel) => channel.url === channelUrl);
// 1.Call markAsRead() when User opens an individual channel.
channel.markAsRead();
// channel.markAsDelivered();
const onCacheResult = (err, messages) => {
updateState({
...stateRef.current,
currentlyJoinedChannel: channel,
messages: messages.reverse(),
loading: false,
});
};
const onApiResult = (err, messages) => {
updateState({
...stateRef.current,
currentlyJoinedChannel: channel,
messages: messages.reverse(),
loading: false,
});
};
const collection = loadMessages(channel, messageHandlers, onCacheResult, onApiResult);
// console.debug("7.handleJoinChannel:: finish load channel mesage collection", currentTime());
updateState({ ...state, messageCollection: collection, isSendToAllSubscribers: false });
};
[Frequency]
// How frequently is this issue occurring?
it’s like a bi-weekly issue, But when it happens to a groupchannel, it stay there.
[Current impact]
// How is this currently impacting your implementation?