-
Notifications
You must be signed in to change notification settings - Fork 438
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
No reports generated... #51
Comments
Hi @tomasharkema, Thank you for the detailed feedback. To me this looks like an error when retrieving the tokens necessary for downloading reports at Apple's servers. This is done by the Apple Mail Plugin, which you have installed correctly (green dot in the top right corner). |
My Mac is indeed connected to an iCloud account. Even multiple for apple's 2FA. Is that maybe the issue? Happy to debug it some more if you have any direction. Also the mail bundle connection appears to be working. |
The function that is creating your access tokens is this one:
It needs a I can imagine that the Apple user id might be one from a different account in your case. Check the function Then you can check if the search party token is actual data Then you might try to set a breakpoint here:
And print what's in the dict
It's quite a bit, but this should cover all areas where an error might arise |
Aha all data is correctly returned. But indeed, in I'll look into how to differentiate the users primary account from keychain. Might be a real pain. Maybe match it with the appstore receipt? Might be that the user that's logged in into the App Store is the same as iCloud. Or maybe provide a picker in some onboarding, but that needs more rework. |
ah, got it working by implementing this: - (NSString *)fetchAppleAccountId {
NSDictionary *query = @{
(NSString *)kSecClass : (NSString *)kSecClassGenericPassword,
(NSString *)kSecAttrService : @"iCloud",
(NSString *)kSecMatchLimit : (id)kSecMatchLimitAll,
(NSString *)kSecReturnAttributes : @true
};
CFTypeRef items;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &items);
if (status == errSecSuccess) {
NSArray<NSDictionary *> *itemsArray = (__bridge NSArray<NSDictionary *> *)(items);
NSDictionary __block *itemDict;
if ([itemsArray count] > 1) {
NSLog(@"Multiple items!");
[itemsArray enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
NSString *email = obj[(NSString *)kSecAttrLabel];
NSLog(@"%@", email);
if ([email hasPrefix:@"tomas@h"]) {
itemDict = obj;
}
}];
} else {
itemDict = itemsArray[0];
}
NSString *accountId = itemDict[(NSString *)kSecAttrAccount];
return accountId;
}
return nil;
} (pretty shocked I still remember the so Oh and by the way, I get results now! |
Hey, im having the same issue with openhaystack. My devices do turn green (at the dot) but just like your issue it wont show a location. Have you found an (easy to use) solution? And has the bug suggestion that you posted above been added to the release yet? Thanks, any help is greatly appreciated! |
Hi, it could be that you suffer from the same issue. We have not fixed this in the latest release. |
Hey SnowFreeze, thanks for ur reply. Would there be a possibility for the devs to work this into the new release? If not could you maybe tell me what files to edit? And what to change? Thanks Edit: i have now got it working, thanks for the help |
I have the same problem, how did you get it working? I don't think I have multiple accounts linked - the code above just crashes and the array looks like there is only a single account. |
Yes dude , i need help as well |
For me it turned out that my device just didn't work, but it's really hard to debug because it's such a black box until locations appear. |
Hi, I really like the work you've done here. Very impressive. I hope reporting my issue can make this project ever more robust.
I've added several devices. Raspberry PI's via HCI and ESP32's via the deploy tool. All are working, and becoming green in the list, but for over two weeks there're still no reports found.
I must say that I'm not leaving home as much because of uncle rona, so maybe only my devices see my haystacks.
By compiling it from source, I see that some calls are erroring:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
See reports after some time
Screenshots
OpenHaystack version:
0.3.6
macOS version:
11.2.3 (20D91)
The text was updated successfully, but these errors were encountered: