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: Stream groups does not get callback when streaming all messages #427

Closed
alexrisch opened this issue Jun 20, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working V3 Followups

Comments

@alexrisch
Copy link
Contributor

Describe the bug

When having both a streamAllMessages (or similar variant) and streamGroups (or similar variant) the streamGroups does not get a callback

Expected behavior

Expect the test case to pass successfully

Steps to reproduce the bug

Simplified Test case:

  let groupCallbacks = 0
  let messageCallbacks = 0
  const [alix, bo] = await createClients(2)
  await Promise.all([
    bo.conversations.streamGroups(async () => {
      groupCallbacks++
    }),
    bo.conversations.streamAllGroupMessages(async () => {
      messageCallbacks++
    }),
  ])

  const group = await alix.conversations.newGroup([bo.address])
  await group.send('Hello')
  await delayToPropogate(10000)

  assert(
    groupCallbacks === 1,
    `group stream should have received 1 group but received ${groupCallbacks}`
  )
  assert(
    messageCallbacks === 1,
    `message stream should have received 1 message but received ${messageCallbacks}`
  )

Test case uses streamGroups & streamAllGroupMessages, but see the same when mixing streamAll and streamAllMessages

@cameronvoell
Copy link
Contributor

Looks like we got a partial fix with PR here, but still seeing db locking errors when the libxmtp repro still sometimes fails xmtp/libxmtp#855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V3 Followups
Projects
Status: Done
Development

No branches or pull requests

4 participants