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: App Crash xmtp_rust_swift::ffi::__swift_bridge__RustClient_publish:: #327

Closed
alexrisch opened this issue Mar 22, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@alexrisch
Copy link
Contributor

Describe the bug

App crashes with xmtp_rust_swift::ffi::__swift_bridge__RustClient_publish::_$u7b$$u7b$closure$u7d$$u7d$::hee8486f9c2d86159 + 1184068

Seen when using:
XMTP Pod: 0.7.7-alpha0
React Native SDK: 1.24.5

Seems to happen when fetching list of conversations, but not entirely sure

Expected behavior

No response

Steps to reproduce the bug

No response

@alexrisch alexrisch added the bug Something isn't working label Mar 22, 2024
@alexrisch
Copy link
Contributor Author

alexrisch commented Mar 23, 2024

This is able to be recreated with the following:

  const alix = await Client.createRandom({ env: 'local' })
  const allowAddresses: string[] = []
  const blockAddresses: string[] = []
  await alix.contacts.refreshConsentList()
  await alix.contacts.consentList()
  const arr = Array(41).fill(true)
  await Promise.all(
    arr.map(async (_, index) => {
      const client = await Client.createRandom({ env: 'local' })
      if (index % 2) {
        blockAddresses.push(client.address)
        await alix.contacts.deny(blockAddresses)
      } else {
        allowAddresses.push(client.address)
        await alix.contacts.allow(allowAddresses)
      }
    })
  )
  console.log('Finished1')
  allowAddresses.push(alix.address)
  blockAddresses.push(alix.address)

  await Promise.all([
    alix.contacts.allow(allowAddresses),
    alix.contacts.deny(blockAddresses),
  ])
  console.log('Finished2')
  await alix.contacts.consentList()
  console.log('Finished3')
  return true
})```
Note this will work if the allow/deny inside of the first Promise.all it will work
So this is an issue with integration

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

1 participant