Skip to content
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

getResourceDataWithGuid failure #73

Closed
everic opened this issue Jan 20, 2015 · 2 comments
Closed

getResourceDataWithGuid failure #73

everic opened this issue Jan 20, 2015 · 2 comments

Comments

@everic
Copy link
Contributor

everic commented Jan 20, 2015

Reported from Daily Notes Dev team:

We have migrated from the IOS evernote sdks Migration_from_SDK_1_x.md to evernote-cloud-sdk-ios to support the 64 bit architecture for our Daily Notes app.

We have followed the procedure mentioned in the guide(https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/Migration_from_SDK_1_x.md https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/Migration_from_SDK_1_x.md) to migrate.

After migrating everything is working fine except the download of resource data.

When we are trying to download the attachments(images) using ENNoteStoreClient class's getResourceDataWithGuid: API, we get the following error all the time.

Error Domain=ENErrorDomain Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}

Steps to Reproduce

  1. Create a note in the Evernote.
  2. Attach a image to that note.
  3. And try to download the resource..

Below is the code snippet for getting the EDAMNote and then getting the EDAMResource from it .

ENNoteStoreClient *noteStore=[ENSession sharedSession].primaryNoteStore;

EDAMSyncChunkFilter *filter=[[EDAMSyncChunkFilter alloc]init];
filter.includeNotes = @yES;
filter.includeNoteResources = @yES;
filter.includeNoteAttributes = @yES;
filter.includeNotebooks = @yES;
filter.includeTags = @yES;
filter.includeSearches = @no;
filter.includeResources = @no;
filter.includeLinkedNotebooks = @no;
filter.includeExpunged = [NSNumber numberWithBool:!fullSunc];
filter.includeNoteApplicationDataFullMap = @yES;
filter.includeResourceApplicationDataFullMap = @no;
filter.includeNoteResourceApplicationDataFullMap = @yES;
filter.requireNoteContentClass = nil;
[noteStore getFilteredSyncChunkAfterUSN:currentUSN
maxEntries:255
filter:filter
success:^(EDAMSyncChunk *syncChunk)
{
completionHandler(syncChunk,nil);
}
failure:^(NSError *error)
{
completionHandler(nil,error);
}];
}

We then extract the required EDAMNote from the syncChunk.

  1. if we try to download the resource associated with this EDAMNote using “getResourceDataWithGuid:” API, it always returns the error. This was working fine in earlier version. Here is the code snippet.

EDAMResource *resource = self.evernoteResource;
ENNoteStoreClient *noteStore = [ENSession sharedSession].primaryNoteStore;

[noteStore getResourceDataWithGuid:resource.guid success:^(NSData *data)
{

} failure:^(NSError *error)
{

}];
}

Error Domain=ENErrorDomain Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}

We have also observed the following log in the console put up by the SDK before getting this error.
Skipping field:<FATField: 0x16ab3940; index = 0; type = 16; optional = NO; name = success; > due to type mismatch (received:11).

We have tried this procedure in the sample app and observed the same behaviour.

@everic
Copy link
Contributor Author

everic commented Jan 22, 2015

Hector from MMM also reported that getResourceRecognitionWithGuid is not working

@everic everic closed this as completed in 7359feb Jan 29, 2015
@everic
Copy link
Contributor Author

everic commented Jan 29, 2015

Should be fixed by 7359feb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant