Consensys / truffle-security

MythX smart contract security verification plugin for Truffle Framework
https://mythx.io
124 stars 28 forks source link

TypeError: Cannot read property 'details' of undefined #157

Closed elenadimitrova closed 5 years ago

elenadimitrova commented 5 years ago

Since upgrading to 1.3.2 truffle verify errors with Cannot read property 'details' of undefined, full output below:


                          Bits |*************************************************************************| 100% || Elapsed: 5.5s ✓ completed
                        Colony |************************************************************************| 100% || Elapsed: 14.6s ✓ completed
               ColonyAuthority |************************************************************************| 100% || Elapsed: 15.5s ✓ completed
               ColonyDataTypes |************************************************************************| 100% || Elapsed: 11.9s ✓ completed
        ColonyNetworkDataTypes |*************************************************************************| 100% || Elapsed: 7.1s ✓ completed
                 ColonyStorage |*************************************************************************| 100% || Elapsed: 6.0s ✓ completed
               CommonAuthority |*************************************************************************| 100% || Elapsed: 9.9s ✓ completed
                 CommonStorage |*************************************************************************| 100% || Elapsed: 7.8s ✓ completed
                 ERC20Extended |*************************************************************************| 100% || Elapsed: 5.5s ✓ completed
                IColonyNetwork |*************************************************************************| 100% || Elapsed: 5.9s ✓ completed
                  IEtherRouter |*************************************************************************| 100% || Elapsed: 5.4s ✓ completed
                     IRecovery |*************************************************************************| 100% || Elapsed: 5.7s ✓ completed
                          Data |************************************************************************| 100% || Elapsed: 10.0s ✓ completed
            PatriciaTreeProofs |*************************************************************************| 100% || Elapsed: 5.9s ✓ completed
                        DSAuth |*************************************************************************| 100% || Elapsed: 5.3s ✓ completed
                  DSAuthEvents |*                                                                          | 2% || Elapsed: 5.5s in progress...
/Users/Elena/colonyNetwork/node_modules/armlet/lib/requester.js:73                                         | 1% || Elapsed: 1.2s in progress...
        const msgs = data.details.reduce((acc, detail) => {                                                | 0% || Elapsed: 0.0s in progress...
                          ^
TypeError: Cannot read property 'details' of undefined
    at Request.request [as _callback] (/Users/Elena/colonyNetwork/node_modules/armlet/lib/requester.js:73:27)
    at Request.self.callback (/Users/Elena/colonyNetwork/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (/Users/Elena/colonyNetwork/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:182:13)
    at IncomingMessage.<anonymous> (/Users/Elena/colonyNetwork/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Link to Circle CI build which shows the above

Version report shows:

truffle-security 1.3.2
api: v1.4.12, harvey: 0.0.16, hash: 115b0fbe157b85d76e68f16db11b8fd1, maestro: 1.2.6, maru: 0.4.2, mythril: 0.20.1, url: https://api.mythx.io

This broke post upgrade from 1.3.1 which was needed because the new version provided a fix for https://github.com/ConsenSys/truffle-security/issues/145, which affects us.

elenadimitrova commented 5 years ago

Looks the same as #158

elenadimitrova commented 5 years ago

I tried going back on the version and pinning us to 1.3.1 but still got this error. It appears the underlying package versions have changed.

The 1.3.1 version that did work:

truffle-security 1.3.1
api: v1.4.8, harvey: 0.0.16, hash: 7100f897124c3f45974be05f88890b8b, maestro: 1.2.5, maru: 0.4.0, mythril: 0.20.1, url: https://api.mythx.io

The 1.3.1 version that doesn't work:

truffle-security 1.3.1
api: v1.4.12, harvey: 0.0.16, hash: 115b0fbe157b85d76e68f16db11b8fd1, maestro: 1.2.6, maru: 0.4.2, mythril: 0.20.1, url: https://api.mythx.io

It's bad if we can't reliably pin the package version..

nbanmp commented 5 years ago

I believe this issue has been fixed in the development version of armlet. We should get a working release out shortly.

nbanmp commented 5 years ago

@elenadimitrova Can you try again with latest truffle-security release v1.3.3? (which should use armlet v2.4.0).

elenadimitrova commented 5 years ago

Thanks @nbanmp this is solved but I bumped into another set of issues I am logging separately as they appear unrelated. Closing this.