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: Errors occurred during sync [Client(KeyPackageVerification(TlsError(EndOfStream)))] #780

Open
irzhywau opened this issue Jan 13, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@irzhywau
Copy link

Describe the bug

I'm actually trying to implement the protocol on a backend service using @xmtp/node-sdk. Among of the flow I try to create a group conversation with an initial member.

Here is a part of such a flow

const conversation = await client.conversations.newGroup([], {
 groupName: name,
 ...(description && {
  groupDescription: description,
 }),
 ...(image && {
  groupImageUrlSquare: image,
 }),
});

await conversation.sync();

if (creatorAddress) {
 // add the creator as admin
 const creatorInbox = await client.getInboxIdByAddress(creatorAddress);
 if (creatorInbox) {
  await conversation.addAdmin(creatorInbox);
   // @todo: add the creator as a member
   // for instance this statement just fails to
   // Errors occurred during sync [Client(KeyPackageVerification(TlsError(EndOfStream)))]
   await conversation.addMembers([creatorAddress]);
  }
 }
}

when I use env=production during client initialization, it seems to be fine.
But when I set env=dev (which is my current setup as we are still under active development) It just fails to

Errors occurred during sync [Client(KeyPackageVerification(TlsError(EndOfStream)))]

I've tried 2 different methods but both throw to same error:

  • add member after creating the conversation (conversation creation seem fine for both environments, failure occurs on await conversation.addMembers([creatorAddress]);)
  • directly add group member during conversation creation, it directly fails at that early stage

Expected behavior

  • I would be good to have seemlessly the same behavior on production and dev
  • and most of all not to be blocked by this error and btw it doesn't really make sense or did I missed something somewhere?

Steps to reproduce the bug

please follow the code snippet above, it even also happens when using @xmtp/browser-sdk also not @xmtp/node-sdk only

@irzhywau irzhywau added the bug Something isn't working label Jan 13, 2025
@nplasterer
Copy link
Contributor

Thanks for the additional information tracking here as well xmtp/libxmtp#1489

@nplasterer
Copy link
Contributor

nplasterer commented Jan 13, 2025

@irzhywau one question do you get this error when creating with a specific client logged in or with any client logged in? Have you tried creating an ephemeral wallet and do you still get the error?
We also have this new chat tool for debugging https://xmtp.chat/ if you login here with the address that is failing how many installations do you see here: https://xmtp.chat/identity and what is your oldest installation?
If you hit the config button you can change the environment to dev.

@irzhywau
Copy link
Author

Im getting this error on any client.
as part of the flow, we create an identity (still in backend) with a privateKey that is generated, we re-use that key to make actions on the related group this identity has created earlier.

thank you for providing this great tool, I will try to play around with it.
Does it also retrieve DMs or only group conversation when syncing?

Actuallly my main concern is about this weird Client(KeyPackageVerification(TlsError(EndOfStream))) error, It would be much appreciated to get some help on tracking it or fix it.

I've tried to follow the code but apparently the logic is within @xmtp/node-bindings. I cannot do much with it

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
Status: No status
Development

No branches or pull requests

2 participants