steemit / steem-js

Steem.js the official JavaScript library for Steem blockchain
https://www.npmjs.com/package/steem
MIT License
472 stars 225 forks source link

memo encryption test fails #119

Open roadscape opened 7 years ago

roadscape commented 7 years ago

These tests are failing reliably on my machine, but apparently not on some others.

  57 passing (18s)
  3 failing

  1) memo encryption obj params:
     Error: This environment does not support encryption.
      at checkEncryption (src/auth/memo.js:109:11)
      at encode (src/auth/memo.js:64:5)
      at Context.<anonymous> (test/memo.test.js:18:27)

  2) memo encryption string params:
     Error: This environment does not support encryption.
      at checkEncryption (src/auth/memo.js:109:11)
      at encode (src/auth/memo.js:64:5)
      at Context.<anonymous> (test/memo.test.js:23:27)

  3) memo known encryption:
     Error: This environment does not support encryption.
      at checkEncryption (src/auth/memo.js:109:11)
      at encode (src/auth/memo.js:64:5)
      at Context.<anonymous> (test/memo.test.js:32:27)

trace:

  memo
    ✓ plain text
Error: encrypted_memo.nonce = 97713297565437100  cause: Illegal value: 97713297565437100 (not an integer or Long)
 stack: TypeError: Illegal value: 97713297565437100 (not an integer or Long)
    at ByteBuffer.module.exports.ByteBufferPrototype.writeUint64 (steem-js/node_modules/bytebuffer/dist/bytebuffer-node.js:1162:27)
    at Object.appendByteBuffer (steem-js/src/auth/serializer/src/types.js:208:11)
    at Serializer.appendByteBuffer (steem-js/src/auth/serializer/src/serializer.js:66:22)
    at Serializer.toByteBuffer (steem-js/src/auth/serializer/src/serializer.js:186:14)
    at Serializer.toBuffer (steem-js/src/auth/serializer/src/serializer.js:191:32)
    at encode (steem-js/src/auth/memo.js:82:20)
    at checkEncryption (steem-js/src/auth/memo.js:99:26)
    at encode (steem-js/src/auth/memo.js:64:5)
    at Context.<anonymous> (steem-js/test/memo.test.js:18:27)
    [...]
    1) encryption obj params
    2) encryption string params
    3) known encryption

nonce:

Long { low: -888296348, high: 22750638, unsigned: false }

How to reproduce

$ npm test

yamadapc commented 7 years ago

Please provide your OS, Node.js Version and npm ls output for `steem-js.