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

Bad state: No element error when sender and recipient are the same! #31

Closed
nileshrathore opened this issue Jan 5, 2023 · 0 comments
Closed

Comments

@nileshrathore
Copy link

I encountered the following error: Unhandled Exception: Bad state: No element at package:xmtp/src/conversation/conversation_v2.dart:117:36. After debugging, I discovered that this error occurs when the sender and recipient are the same. I believe that in this case assigning the sender or recipient directly to a peer could prevent this issue from occurring.

Full logs:-
flutter: xmtp: <-- #007 /xmtp.message_api.v1.MessageApi/Query [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No element #0 SetMixin.firstWhere (dart:collection/set.dart:236:5) #1 ConversationManagerV2._conversationFromInvite (package:xmtp/src/conversation/conversation_v2.dart:117:36) <asynchronous suspension> #2 Future.wait.<anonymous closure> (dart:async/future.dart:522:21) <asynchronous suspension> #3 ConversationManagerV2.listConversations (package:xmtp/src/conversation/conversation_v2.dart:91:25) <asynchronous suspension> #4 ConversationManager.listConversations (package:xmtp/src/conversation/manager.dart:63:19) <asynchronous suspension> #5 XmtpSession.refreshConversations (package:orb/component/xmtp/xmtp_session.dart:224:25) <asynchronous suspension> #6 XmtpSession._onListenConversations (package:orb/component/xmtp/xmtp_session.dart:244:5) <asynchronous suspension>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants