Sreevijitha / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

The operation couldn’t be completed. (com.google.GDataServiceDomain error 404.) while fetching contacts. #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.GDataServiceGoogleContact *service = [self contactService];
    NSURL *Feed_url = [GDataServiceGoogleContact contactFeedURLForUserID:kGDataServiceDefaultUser];
    GDataQueryContact *Query = [GDataQueryContact contactQueryWithFeedURL:Feed_url];
    [Query setMaxResults:1000];
    [service fetchFeedWithQuery:Query delegate:self didFinishSelector:@selector(contactsFetchTicket:finishedWithFeed:error:)];
    NSLog(@"fdddD");
}

- (GDataServiceGoogleContact *)contactService {
    static GDataServiceGoogleContact* service = nil;

    if (!service) {
        service = [[GDataServiceGoogleContact alloc] init];
        [service setShouldCacheResponseData:YES];
        [service setServiceShouldFollowNextLinks:YES];
    }
    [service setUserCredentialsWithUsername:G_username password:G_password];
    return service;
}

- (void)contactsFetchTicket:(GDataServiceTicket *)ticket 
finishedWithFeed:(GDataFeedContact *)feed error:(NSError *)error {
    if (error) {
        NSDictionary *userInfo = [error userInfo];
        //NSLog(@"Contacts Fetch error :%@", [userInfo objectForKey:@"NSLocalizedDescriptionKey"]);
        NSLog(@"%@",[error localizedDescription]);

        if ([[userInfo objectForKey:@"Error"] isEqual:@"BadAuthentication"]) {
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Authentication failed." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [alertView show];
        }
        else {
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Failed to get contacts." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
            [alertView show];
        }
    }
    else {
//Get contacts
}

What is the expected output? What do you see instead?
Expected output no error, contacts fetched.
Seeing error, no contacts fetched.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by syedtari...@gmail.com on 28 May 2015 at 2:38

GoogleCodeExporter commented 9 years ago
Please note that the contacts fetching was working fine as of 25th may 2015, 
the api started giving errors only recently.

Original comment by syedtari...@gmail.com on 28 May 2015 at 2:41