tagomaru / truffle-sca2t

Smart contract auditing assistant tool for Truffle Framework.
18 stars 4 forks source link

"ENOENT: no such file or directory" when generating test #17

Closed muellerberndt closed 5 years ago

muellerberndt commented 5 years ago

When generating tests for one of the smart contracts in AragonOS I get the following error:

$ truffle run mythx apm/APMRegistry.sol

    > compilation warnings encountered:

(... compiler warnings etc...)
bytecode of 'IACL' is '0x'. skipping...
bytecode of 'IACLOracle' is '0x'. skipping...
bytecode of 'AppProxyBase' is '0x'. skipping...
bytecode of 'DelegateProxy' is '0x'. skipping...
bytecode of 'DepositableDelegateProxy' is '0x'. skipping...
bytecode of 'IVaultRecoverable' is '0x'. skipping...
bytecode of 'VaultRecoverable' is '0x'. skipping...
bytecode of 'IEVMScriptExecutor' is '0x'. skipping...
bytecode of 'IEVMScriptRegistry' is '0x'. skipping...
bytecode of 'IKernel' is '0x'. skipping...
bytecode of 'AbstractENS' is '0x'. skipping...
bytecode of 'ERCProxy' is '0x'. skipping...
bytecode of 'ERC20' is '0x'. skipping...
success - Test code of APMInternalAppNames in apm/APMRegistry.sol is generated.
success - Test code of APMRegistry in apm/APMRegistry.sol is generated.
Error: ENOENT: no such file or directory, open '/Users/bernhardmueller/Desktop/MythX-Testing/aragonOS/test_security/test_apm/APMRegistry.sol_.js'
    at Object.openSync (fs.js:448:3)
    at Object.writeFileSync (fs.js:1210:35)
    at ejs.renderFile (/usr/local/lib/node_modules/truffle-sca2t/node_modules/truffle-sca2t-mythx/lib/generator.js:104:12)
    at tryHandleCache (/usr/local/lib/node_modules/truffle-sca2t/node_modules/ejs/lib/ejs.js:257:5)
    at Object.exports.renderFile (/usr/local/lib/node_modules/truffle-sca2t/node_modules/ejs/lib/ejs.js:482:10)
    at Generator.generateTestFile (/usr/local/lib/node_modules/truffle-sca2t/node_modules/truffle-sca2t-mythx/lib/generator.js:101:11)
    at Generator.generate (/usr/local/lib/node_modules/truffle-sca2t/node_modules/truffle-sca2t-mythx/lib/generator.js:31:10)
Truffle v5.0.10 (core: 5.0.10)
Node v11.13.0
tagomaru commented 5 years ago

@b-mueller Thanks for your raising this up ! I fixed and published v0.2.4 in npmjs.

tagomaru commented 5 years ago

Ah - i found a slight problem. just a moment pls.

tagomaru commented 5 years ago

@b-mueller i published v0.2.5. please try it. In my environment it worked.

muellerberndt commented 5 years ago

Yes, works!