Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Failing to stream when streaming client creates group/dm #376

Open
cameronvoell opened this issue Feb 7, 2025 · 3 comments
Open

Bug: Failing to stream when streaming client creates group/dm #376

cameronvoell opened this issue Feb 7, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@cameronvoell
Copy link
Contributor

cameronvoell commented Feb 7, 2025

Describe the bug

  • note this bug for now seems android only - equivalent functionality seem to be working in xmtp-ios

testCanStreamGroupsAndConversations in ConversationsTest.kt started failing on xmtp-android main starting with commit 65be7d1. which merged PR #363 .

That PR updated libxmtp ref from fc37819c to a48e9a79

fun testCanStreamGroupsAndConversations() {
val allMessages = mutableListOf<String>()
val job = CoroutineScope(Dispatchers.IO).launch {
try {
boClient.conversations.stream()
.collect { message ->
allMessages.add(message.topic)
}
} catch (e: Exception) {
}
}
Thread.sleep(1000)
runBlocking {
caroClient.conversations.newGroup(listOf(bo.walletAddress))
Thread.sleep(1000)
boClient.conversations.findOrCreateDm(caro.walletAddress)
}
Thread.sleep(2000)
assertEquals(2, allMessages.size)
job.cancel()
}

Expected behavior

No response

Steps to reproduce the bug

No response

@cameronvoell cameronvoell added the bug Something isn't working label Feb 7, 2025
@cameronvoell
Copy link
Contributor Author

other format for streaming test also failing when streaming client creates group:

see modified test on branch here:

@Test
fun testCanStreamGroups() = kotlinx.coroutines.test.runTest {
boClient.conversations.stream(type = ConversationType.GROUPS).test {
val group =
alixClient.conversations.newGroup(listOf(bo.walletAddress))
assertEquals(group.id, awaitItem().id)
val group2 =
boClient.conversations.newGroup(listOf(caro.walletAddress))
assertEquals(group2.id, awaitItem().id)
}
}

@nplasterer
Copy link
Contributor

Seeing this fail in RN as well consistently across iOS and Android. Dms created by self are failing.

@cameronvoell
Copy link
Contributor Author

Was able to test this fix on xmtp-android, and xmtp-react-native android, looks like it clears up the issue 🎉
xmtp/libxmtp#1613

Will close out this issue once we have that fix merged through the SDKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants