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

findNotesMetadata error #83

Closed
anyinlover opened this issue Dec 27, 2017 · 2 comments
Closed

findNotesMetadata error #83

anyinlover opened this issue Dec 27, 2017 · 2 comments

Comments

@anyinlover
Copy link

anyinlover commented Dec 27, 2017

Please look at my error, node 9.3.0 evernote 2.0.5:

var filter = new Evernote.NoteStore.NoteFilter({
words: ['markdown'],
ascending: true
});

var spec = new Evernote.NoteStore.NotesMetadataResultSpec({
includeTitle: true
});

noteStore.findNotesMetadata(filter, 0, 10, spec).catch(function (err) {
    console.log(err);
    });

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type object
at Function.byteLength (buffer.js:512:11)
at Object.BinaryParser.fromString (/Users/michael/.node/node_modules/evernote/lib/thrift/protocol/binaryProtocol.js:500:22)
at BinaryProtocol.writeString (/Users/michael/.node/node_modules/evernote/lib/thrift/protocol/binaryProtocol.js:148:30)
at BinaryProtocol.writeType (/Users/michael/.node/node_modules/evernote/lib/thrift/protocol/binaryProtocol.js:168:25)
at new Thrift.Struct.write (/Users/michael/.node/node_modules/evernote/lib/thrift/thrift.js:532:24)
at Thrift.Struct.write (/Users/michael/.node/node_modules/evernote/lib/thrift/thrift.js:530:17)
at Thrift.Method.sendRequest (/Users/michael/.node/node_modules/evernote/lib/thrift/thrift.js:162:15)
at NoteStoreClient.findNotesMetadata (/Users/michael/.node/node_modules/evernote/lib/thrift/gen-js2/NoteStore.js:1584:8)
at /Users/michael/.node/node_modules/evernote/lib/stores.js:106:14
at

A good updated tutorial is needed! Thx

@akhaku
Copy link
Contributor

akhaku commented Jan 2, 2018

NoteFilter.words is supposed to be a string, not an array. Try replacing ['markdown'] with 'markdown'?

@anyinlover
Copy link
Author

thank you, now it works.

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

2 participants