I have read all answers on stack overflow about this error and none solved the case, because my question is a little different.
I am enumerating iCloud drive elements
I think the issue is arising due to permissions to read the files after the URL's have been found. Per this answer, however, you should be able to do it with the following:
[url startAccessingSecurityScopedResource];
NSFileCoordinator *coordinator = [[NSFileCoordinator alloc] init];
__block NSError *error;
[coordinator coordinateReadingItemAtURL:url options:0 error:&error byAccessor:^(NSURL *newURL) {
[newURL getResourceValue:&image forKey:NSURLThumbnailDictionaryKey error:&error];
}];
[url stopAccessingSecurityScopedResource];