Comments (17)
Bolts stops the app here:
- (void)setError:(NSError *)error {
if (![self trySetError:error]) {
[NSException raise:NSInternalInconsistencyException
format:@"Cannot set the error on a completed task."];
}
}
ALL this starts with the load operation of a PFQueryTableViewController as follows, reiterating that nothing in this ViewController was touched prior to the start of the errors. I have tagged the Parse guys from their Google Group to help:
- (BFTask *)loadObjects:(NSInteger)page clear:(BOOL)clear {
self.loading = YES;
[self objectsWillLoad];
BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
PFQuery *query = [self queryForTable];
[self _alterQuery:query forLoadingPage:page];
[query findObjectsInBackgroundWithBlock:^(NSArray *foundObjects, NSError *error) {
if (![Parse isLocalDatastoreEnabled] &&
query.cachePolicy != kPFCachePolicyCacheOnly &&
error.code == kPFErrorCacheMiss) {
// no-op on cache miss
return;
}
self.loading = NO;
if (error) {
_lastLoadCount = -1;
[self _refreshPaginationCell];
} else {
_currentPage = page;
_lastLoadCount = [foundObjects count];
if (clear) {
[_mutableObjects removeAllObjects];
}
[_mutableObjects addObjectsFromArray:foundObjects];
[self.tableView reloadData];
}
[self objectsDidLoad:error];
[self.refreshControl endRefreshing];
[source setError:error];
}];
return source.task;
}
from bolts-objc.
For what it is worth, the app continues to work perfectly with this:
- (void)setError:(NSError *)error {
if (!error) {
NSLog(@"Bolts bug: setting nil error (their bug): %s", __PRETTY_FUNCTION__);
return;
}
if (![self trySetError:error]) {
[NSException raise:NSInternalInconsistencyException
format:@"Cannot set the error on a completed task."];
}
}
On a fresh load of two rows, it gets hit 4x. On return to the view from a pushed view, it gets hit only once. This may provide a clue..
from bolts-objc.
And i did a simple textual comparison of the h&m files, and there were no changes at all. This seems to hint at something amiss via IB perhaps? Thus far, i am stumped for a strong indicator of the issue. It only manifests in this one view, which has nothing cutting edge on it at all..
from bolts-objc.
to continue my monologue: i rebuild all the lost work from the last good backup to the messed up version, documenting each step, and got to the point where the Bolts errors started and no issue at all. So clearly (at least to me) there is something internal to Bolts that is very sensitive to some activity with IB (as that is were most of the effort was) and yet this makes little sense.
Perhaps there is something in how i work, via copy and pasting existing code etc that causes this. It cannot be the code itself as i copied the exact code that lead to the situation.
Very puzzling.
from bolts-objc.
It happened again today, for no reason.
Even odder, and perhaps a clue. I simply ran the app on my device (not in debug mode), and it continued to work past the Bolts barf point while in debug mode. That is it, i am simply patching Bolts and moving on, and this is clearly an internal bug to either Parse or Bolts.
from bolts-objc.
+1 @wdcurry . I have the exact same thing, and posted in ParseUI. You can see here: https://github.com/ParsePlatform/ParseUI-iOS/issues/108
from bolts-objc.
+1 @wdcurry Thanks for the workaround. I encountered the same error when porting Anypic to Swift https://github.com/kwkhaw/SwiftAnyPic. I ended up by forking the Bolts-iOS and applied the workaround.
from bolts-objc.
could this be included in the master at any point?
works for me as well
from bolts-objc.
For what it's worth, this happened to me because of a caching issue, as soon as I changed the cachePolicy to kPFCachePolicyNetworkElseCache it stopped...
from bolts-objc.
I have ran into this problem a few times as well, the recent time was due to me calling loadData while the controller was already loading. I still can't determine what is actually causing setError to be called when the task is completed though.
from bolts-objc.
error also went away for me when i changed to kPFCachePolicyNetworkElseCache
from bolts-objc.
The error may disappear, but this pushes the caching behind the network call.. not ideal.
from bolts-objc.
Any news on Parse updating to incorporate the workaround? Or do we need to fork our own and make the changes?
from bolts-objc.
I keep having issues with the Bolts library. Says No such File or directory. I rebuild and it finds the previous file, but comes up with another bolts file not found. I am wondering if this has to do with the location of my project being on an external drive.
from bolts-objc.
Hey guys, I am going to close out this issue, since it looks like it's resolved.
Please let me know otherwise by commenting here or reopening it.
from bolts-objc.
@wdcurry workaround did the trick
from bolts-objc.
glad to help @dbarabander .. little tips like this can help make small-shop coders as effective as the big-boys!
from bolts-objc.
Related Issues (20)
- Documents not available at 1.9.0 on cocoapods.org. HOT 1
- EXC_BAD_ACCESS in BfTask.m
- Next Version Release? HOT 5
- 7 Semantic Issues in XCode 10.1 with Bolts 1.9.0 HOT 3
- ``` HOT 2
- setException deprecated
- Apple Review HOT 10
- Need the Bolts framework with mac catalyst support HOT 2
- Script build_framework.sh fails HOT 1
- need latest BoltsFramework HOT 1
- Built framework lacks slices HOT 2
- Bolts not updating to 1.9.1
- REMOVE ALL UIWEBVIEW REFERENCES OR TEXT IN README.MD
- IPhone
- Crash BFTask.m - Line 54 Crashed: com.parse.asynctaskqueue.sync SIGABRT ABORT 0x00000001b70da95c HOT 3
- U
- Failed to install apps when using Carthage and Xcode12.5 HOT 1
- Is Bolts relevant in 2022 for handling simple deeplinks opening from Facebook?
- Library not loaded: @rpath/Bolts.framework/Versions/A/Bolts
- Privacy manifest required by Apple
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolts-objc.