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: New conversation not appearing after wallet switch #163

Open
humanagent opened this issue Jan 26, 2024 · 3 comments · Fixed by #164
Open

Bug: New conversation not appearing after wallet switch #163

humanagent opened this issue Jan 26, 2024 · 3 comments · Fixed by #164
Assignees
Labels
bug Something isn't working

Comments

@humanagent
Copy link
Contributor

humanagent commented Jan 26, 2024

Description

New conversations are not appearing after switching between addresses in MetaMask using XMTP.

Steps to Reproduce

  1. Sign in with address 1 in MetaMask, send a conversation to a random address.
  2. Log out, switch to address 2, and send a conversation to address 1.
  3. Refresh the app and observe the missing conversation.

Clearing the cache

  • Clearing the cache and DB does resolve the issue, showing all the conversations
Brave.Browser.mp4
@humanagent humanagent added the bug Something isn't working label Jan 26, 2024
@rygine rygine self-assigned this Jan 29, 2024
@humanagent
Copy link
Contributor Author

We found another bug related to this issue that I was able to reproduce using using v5.0.1 of @xmtp/react-sdk.

Steps to reproduce:

  • Log into XMTP as Address 1
  • Send message to Address 2, where Address 2 is an address in the same metamask wallet
  • Sign out, and sign back in as Address 2
  • See that when conversations show up, the messages don't arrive, sometimes the conversation will not even pop up if it is a new conversation. Messages say they are sent without error, but the useMessages hook reveals that no messages were received
Brave.Browser.mp4

@humanagent humanagent reopened this Feb 5, 2024
@rygine
Copy link
Collaborator

rygine commented Mar 11, 2024

@fabriguespe is this the issue that affects bun?

@Barabazs
Copy link

Barabazs commented Dec 5, 2024

@humanagent I think I'm running into the same bug. Is there any progress on this?

Here's my situation:

  1. address 1 sends message to address 2
  2. address 2 opens the conversation and does not see any messages
...
const { messages } = useMessages(conversation)
// messages is an empty array

const msgs = await conversation.messages()
// msgs contains 1 message

const lastMessage = useLastMessage(conversation.topic);
// lastMessage contains the same message as in msgs

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

Successfully merging a pull request may close this issue.

3 participants