Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

Invalid argument exception when reading payload #132

Open
prashantv opened this issue Mar 23, 2016 · 1 comment
Open

Invalid argument exception when reading payload #132

prashantv opened this issue Mar 23, 2016 · 1 comment

Comments

@prashantv
Copy link

> node node/node.js VersioningTestV2 < out/1458749649719981552-0-VersioningTestV2.bin

/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node.js:21
    throw res.err;
             ^
BufrwInvalidArgumentError: invalid argument, expected a number
    at Object.createError [as InvalidArgument] (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/error/typed.js:31:22)
    at Object.expected (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/bufrw/errors.js:27:27)
    at IntegerRW.poolWriteInto (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/bufrw/atoms.js:73:40)
    at MapObjectRW.poolWriteInto (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/map-object.js:106:29)
    at StructRW.poolWriteInto (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/struct.js:334:37)
    at StructRW.writeInto (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/bufrw/base.js:83:10)
    at intoBufferResult (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/bufrw/interface.js:158:18)
    at Object.toBufferResult (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/node_modules/bufrw/interface.js:143:12)
    at StructRW.toBuffer (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node_modules/thriftrw/rw.js:34:18)
    at Object.<anonymous> (/Users/prashant/gocode/src/github.com/thriftrw/thriftrw-test/node/node.js:19:21)

Payload in binary:

> xxd out/1458749649719981552-0-VersioningTestV2.bin
0000000: 0800 0158 fd5d c808 0002 ffc3 d64e 0300  ...X.].......N..
0000010: 03ec 0600 04a1 d50a 0005 11ef 1b62 4d04  .............bM.
0000020: 057d 0400 06ff e12f edfb 9ab7 520c 0007  .}...../....R...
0000030: 0b00 0100 0000 4cf3 a097 9cf3 ac8c 83f2  ......L.........
0000040: 8390 9ef3 b6a9 99f3 bd98 bdf1 b098 a0f0  ................
0000050: afae adf3 b199 9df3 868e 82f0 9a8b 81f2  ................
0000060: 969b 81f1 97a7 b7f2 af94 a2f0 b8ac b8f2  ................
0000070: 87b5 80f4 80ab a6f3 aa9b 80f3 818a a0f2  ................
0000080: 878a ae08 0002 c99f e35f 000f 0008 0800  ........._......
0000090: 0000 000e 0009 0800 0000 0206 af0d 4bd6  ..............K.
00000a0: a033 580d 000a 0808 0000 0001 21ca eb65  .3X.........!..e
00000b0: b764 d57f 0b00 0b00 0000 4ff1 818c 90f1  .d........O.....
00000c0: 81b0 aff4 86aa aef3 b189 97f2 ac93 a5f0  ................
00000d0: b3a2 85f3 8196 8bf2 979a 93f4 8284 a3f4  ................
00000e0: 8f85 adf2 b5af bef0 a2b1 8cf2 92be 88f0  ................
00000f0: 97bd b0e1 9bb1 f2b4 b4bb f3ac 848e f380  ................
0000100: bf8b f3af b99a f3b7 9da4 0800 0c6e e6fc  .............n..
0000110: 4300                                     C.

Wire value representation:

> cat out/1458749649719981552-0-VersioningTestV2.txt
TStruct({1: TI32(1492999624), 2: TI32(-3942834), 3: TI8(-20), 4: TI16(-24107), 5: TI64(1292281727091475837), 6: TDouble(-9.655423916651008e+307), 7: TStruct({1: TBinary([243 160 151 156 243 172 140 131 242 131 144 158 243 182 169 153 243 189 152 189 241 176 152 160 240 175 174 173 243 177 153 157 243 134 142 130 240 154 139 129 242 150 155 129 241 151 167 183 242 175 148 162 240 184 172 184 242 135 181 128 244 128 171 166 243 170 155 128 243 129 138 160 242 135 138 174]), 2: TI32(-912268449)}), 8: TList([]TI32{}), 9: TSet([set]TI32{TI32(112135499), TI32(-694144168)}), 10: TMap(map[TI32]TI32{TI32(566946661): TI32(-1218128513)}), 11: TBinary([241 129 140 144 241 129 176 175 244 134 170 174 243 177 137 151 242 172 147 165 240 179 162 133 243 129 150 139 242 151 154 147 244 130 132 163 244 143 133 173 242 181 175 190 240 162 177 140 242 146 190 136 240 151 189 176 225 155 177 242 180 180 187 243 172 132 142 243 128 191 139 243 175 185 154
@prashantv
Copy link
Author

expected_number.zip

Binary payload zipped up

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

No branches or pull requests

1 participant