Skip to content

Instantly share code, notes, and snippets.

@chrislopresto
Created February 12, 2016 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrislopresto/a97226172c8279171c37 to your computer and use it in GitHub Desktop.
Save chrislopresto/a97226172c8279171c37 to your computer and use it in GitHub Desktop.
Scoped Keys Issue - keen-js
> Keen = require('keen-js');
> Keen.version
'3.4.0-rc4'
> var masterKey = process.env.YAPP_KEEN_MASTER_KEY;
> var appIdA = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
> var scopedKeyA = Keen.utils.encryptScopedKey(masterKey, {
... filters: [{
..... property_name: 'appId',
..... operator: 'eq',
..... property_value: appIdA
..... }]
... });
Error: Invalid key length
at Error (native)
at new Cipheriv (crypto.js:225:16)
at Object.Cipheriv (crypto.js:223:12)
at Object.module.exports [as encryptScopedKey] (/xxxxx/xxxxxxxxxxxxx/x/xxxxxxx/xxxxxxxx/xxxx-xxxxxx/xxxxxxxxxxxx/xxxx-xx/xxx/xxxxxx/xxxxx/xxxxxxxxxxxxxxxx.xx:x:xx)
at repl:1:29
at REPLServer.defaultEval (repl.js:132:27)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
at REPLServer.<anonymous> (repl.js:279:12)
at REPLServer.emit (events.js:107:17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment