System.ArgumentException: The key already existed in the dictionary.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- mobile-dev
Research direction
Start with Toasts.Forms.Plugin.Droid/ToastNotification.cs at Notify and CancelAllDelivered, then inspect SnackbarNotification.cs around line 34 and ToastClosed. Reproduce or reason about concurrent Notify calls and dismissal callbacks. Done means repeated or concurrent notifications no longer cause a duplicate-key exception while delivered notifications can still be cancelled.
Written by the indexing model from the issue text.
Description
Good day!
Version: 3.3.2
Exception: System.ArgumentException: 'The key already existed in the dictionary.' from SnackbarNotification.
Stack trace:
IDictionary<TKey,TValue>.Add (TKey key, TValue value)
SnackbarNotification.ToastClosed (System.String id, Plugin.Toasts.NotificationResult result)
SnackbarNotification.<Notify>b__5_2 (System.String toastId, Plugin.Toasts.NotificationResult result)
ToastCallback.OnDismissed (Android.Support.Design.Widget.Snackbar snackbar, System.Int32 evt)
Snackbar+Callback.n_OnDismissed_Landroid_support_design_widget_Snackbar_I (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_transientBottomBar, System.Int32 e)
We call a Notify method from ToastNotification class in several threads. I think that we catch a situation when we have the same id on line https://github.com/EgorBo/Toasts.Forms.Plugin/blob/8132380da78f34f0b3611f6fe7ef9880a2259a98/Toasts.Forms.Plugin.Droid/SnackbarNotification.cs#L34 and after that we call CancelAllDelivered method.
- Dominant language
- C#
- Stars
- 275
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EgorBo/Toasts.Forms.Plugin
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
EgorBo/Toasts.Forms.Plugin#182 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
EgorBo/Toasts.Forms.Plugin#181 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
EgorBo/Toasts.Forms.Plugin#180 · 2 comments ·
-
MacOS supportOpen
Difficulty 5/5 Over a week Newbie friendliness 18/100
EgorBo/Toasts.Forms.Plugin#178 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 25/100
EgorBo/Toasts.Forms.Plugin#176 · 2 comments ·
All issues in EgorBo/Toasts.Forms.Plugin
Similar issues
-
:watch: Not Triaged async-task-programming/subsvc dotnet-csharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Python: Bug: AnnotationContent and StreamingAnnotationContent to_element writes CitationType.X, so annotations in a rendered chat history fail to parsePossibly taken A pull request linked to this issue is open or already merged. Openpython triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/semantic-kernel#14590 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Needs-Triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PowerShell/PowerShell#28194 ·
Maintainers usually reply within 1 day
-
AI Projects Client customer-reported needs-team-attention question Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Azure/azure-sdk-for-net#63804 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day