-
Notifications
You must be signed in to change notification settings - Fork 576
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
"Cannot set the result on a completed task." even with trySetResult #207
Comments
I have tried calling |
This should actually not produce an error, unless you are trying to set the result on a Also, from the stack trace above - it looks like it's throwing an exception from a different stack frame: It might be an Swift optimization problem as well, but I highly doubt it... P.S. You can simplify your code to this: func didFinishVKAuthentication() -> BFTask {
// auth with vk
return PFUser.logInWithUsernameInBackground(username, password: "").continueWithBlock { task: BFTask! -> AnyObject! in
if task.faulted {
return task
}
return nil
}
} |
@nlutsenko Please see my updated comment. Sorry for miscommunication... |
Sorry, getting confused, can you re-post a comment that was updated? Or combine the updates in a new comment? I can't seem to be able to find any changes between the previous one and the new one. Also, I am 99% close to be certain that |
@nlutsenko , The thing is that I still had an exception with |
There is no possibility that the latest version of Bolts ( |
Not sure why, but on Bolts(1.3.0) and Parse(1.9.0) I don't see the issue. When I update to Bolts(1.6.0) and Parse(1.12.0) it appears. I'm a newb, but wanted to post this incase it was helpful for anyone. |
My guess is that @nlutsenko is rights in his assumption that multiple notifications have called my completion block... |
When this method is used for the second time (for the same instance), I get an exception, even though "mainTask" does get a new reference when this method is used again.
Here`s the stack trace.
The text was updated successfully, but these errors were encountered: