OutlierVentures / BuyCoPoc

BuyCo.io Proof of Concept on an Ethereum blockchain
Apache License 2.0
0 stars 1 forks source link

Crash on "Invalid continuation byte", some weird data in contract? #37

Closed AronVanAmmers closed 8 years ago

AronVanAmmers commented 8 years ago

On my local blockchain node there's a proposal with address 0x84c3357ff8b7c205e7ac5393fcaba236ee323466. Getting the backers of this proposal leads to the exception below.

The exception happens in the internals of web3.js, so not much we can do about it other than catch the error.

I don't know what could be the cause; not much string data is stored with the backer. Only further circumstance was that the transaction for this backing was created from the client side, not the server side.

P:\BuyCo\BuyCo\node_modules\utf8\utf8.js:131
                throw Error('Invalid continuation byte');
                ^

Error: Invalid continuation byte
    at Error (native)
    at readContinuationByte (P:\BuyCo\BuyCo\node_modules\utf8\utf8.js:131:9)
    at decodeSymbol (P:\BuyCo\BuyCo\node_modules\utf8\utf8.js:160:16)
    at Object.utf8decode [as decode] (P:\BuyCo\BuyCo\node_modules\utf8\utf8.js:206:17)
    at Object.toUtf8 (P:\BuyCo\BuyCo\node_modules\web3\lib\utils\utils.js:112:17)
    at formatOutputString [as _outputFormatter] (P:\BuyCo\BuyCo\node_modules\web3\lib\solidity\formatters.js:218:18)
    at P:\BuyCo\BuyCo\node_modules\web3\lib\solidity\type.js:235:25
    at SolidityType.decode (P:\BuyCo\BuyCo\node_modules\web3\lib\solidity\type.js:236:11)
    at P:\BuyCo\BuyCo\node_modules\web3\lib\solidity\coder.js:217:29
    at Array.map (native)
    at SolidityCoder.decodeParams (P:\BuyCo\BuyCo\node_modules\web3\lib\solidity\coder.js:216:26)
    at SolidityFunction.unpackOutput (P:\BuyCo\BuyCo\node_modules\web3\lib\web3\function.js:90:24)
    at Object.callback (P:\BuyCo\BuyCo\node_modules\web3\lib\web3\function.js:118:30)
    at P:\BuyCo\BuyCo\node_modules\web3\lib\web3\method.js:165:21
    at P:\BuyCo\BuyCo\node_modules\web3\lib\web3\requestmanager.js:104:9
    at HttpProvider.sendAsync.request.onreadystatechange (P:\BuyCo\BuyCo\node_modules\web3\lib\web3\httpprovider.js:114:13)
    at exports.XMLHttpRequest.dispatchEvent (P:\BuyCo\BuyCo\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:591:25)
    at exports.XMLHttpRequest.setState (P:\BuyCo\BuyCo\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:610:14)
    at IncomingMessage.<anonymous> (P:\BuyCo\BuyCo\node_modules\xmlhttprequest\lib\XMLHttpRequest.js:447:13)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:893:12)
AronVanAmmers commented 8 years ago

Caught the error using a domain in a804a260.

AronVanAmmers commented 8 years ago

Possibly part of #40.

I got this issue on an increasing amount of contracts on that chain.

bartvanderwal commented 8 years ago

@AronVanAmmers, I also ran into this bug.

I am trying to extend caching with proposalBacking info. I get this issue when I call getBackers() when try to update the cache (POST to https://selfsigned.blockstars.io:4124/api/data/cache/update).

Note: I'm calling proposalService.getBackers with the proposal's transactionID as the parameter. Is that correct?

AronVanAmmers commented 8 years ago

Ok, you're still using http://blockstars.io:9001 I presume? Will reset the blockchain over there to hopefully solve this for you too.

proposalService.getBackers should be called with the proposal address, something that looks like 0x17f118b4efb225e8d911d837512a2dcc0caf9392.

AronVanAmmers commented 8 years ago

The blockchain on http://blockstars.io:9001 was reset. The new registry address is 0x3a066d8e848afccb86c762a00d1aa95ebcabe0de.

AronVanAmmers commented 8 years ago

Haven't seen this in a long time, closing.