-
Notifications
You must be signed in to change notification settings - Fork 81
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
completion handler is invoked twice with two different failure results #333
Comments
I am experiencing the same issue.
I've created a gist with a code sample |
Also experiencing the same issue. |
Seems that this crash popped up again on Apr 13, might be related to "Issues with the Contentful Web App and Asset rendering" |
I just encountered this because I've wrapped The issue is in If a failure happens on the original decode the failure completion is called but not returned so it continues to a second decoded check that fails and again calls
|
I've created a PR with a patch and a suggestion on tackling the reason behind having it called twice. |
With the following code:
When decoding fails, for example if the content does not contain data at a key you've specified is required, the completion handler is called twice with two different failure results. This is ultimately crashing my app because I wrap this in a DispatchGroup enter() and leave() so it tries to leave twice. This is what's logged:
Here's my decoder:
The text was updated successfully, but these errors were encountered: