muellerberndt / sabre

Security analyzer for Solidity smart contracts. Uses the MythX smart contract security service.
https://mythx.io
MIT License
60 stars 23 forks source link

Dependency issue: Cannot find module '@truffle/provisioner' #104

Closed muellerberndt closed 4 years ago

muellerberndt commented 4 years ago

A fresh installation of Sabre 0.10.2 throws an error when running the 'analyze' command.

$ sabre analyze contracts/MetaCoin.sol 
Error: Cannot find module '@truffle/provisioner'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/bernhardmueller/.nvm/versions/node/v11.15.0/lib/node_modules/sabre-mythx/node_modules/@truffle/resolver/lib/resolver.ts:3:19)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/bernhardmueller/.nvm/versions/node/v11.15.0/lib/node_modules/sabre-mythx/node_modules/@truffle/resolver/lib/index.ts:3:1)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/bernhardmueller/.nvm/versions/node/v11.15.0/lib/node_modules/sabre-mythx/lib/controllers/analyze.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)

** Expected behaviour

Should run normally.

yacare555 commented 4 years ago

Hi @b-mueller , seems like gitcoin is not posting the applications in GitHub, just in case you didn't see it. I started to look at this and the problem is that the @truffle/provisioner packager isn't getting its files published and when installing @truffle/resolver, the @truffle/provisioner dependency is installed empty. I've sent a PR to truffle https://github.com/trufflesuite/truffle/pull/3280 to fix it.

surajsingla333 commented 4 years ago

Hi @b-mueller, I have worked on various truffle and npm projects and also have recently applied for a truffle box listing which I created. I will be able to find the root cause and solve the same within a day. Kindly accept my proposal and approve me to work on it.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 266 years, 2 months from now. Please review their action plans below:

1) yacare555 has been approved to start work.

The @truffle/provisioner isn't getting its files published. When installing @truffle/resolver, the @truffle/provisioner dependency installed is empty. I've sent a PR to truffle https://github.com/trufflesuite/truffle/pull/3280 with a possible fix. 2) eswarasai has applied to start work _(Funders only: approve worker | reject worker)_.

Will debug the root cause for missing package and see if any upgradation is needed. Thanks! 3) surajsingla333 has applied to start work _(Funders only: approve worker | reject worker)_.

Hello, I have worked on various truffle and npm projects and also have recently applied for a truffle box listing which I created. I will be able to find the root cause and solve the same within a day. Kindly accept my proposal and approve me to work on it.

Learn more on the Gitcoin Issue Details page.

muellerberndt commented 4 years ago

Hi @b-mueller , seems like gitcoin is not posting the applications in GitHub, just in case you didn't see it. I started to look at this and the problem is that the @truffle/provisioner packager isn't getting its files published and when installing @truffle/resolver, the @truffle/provisioner dependency is installed empty. I've sent a PR to truffle trufflesuite/truffle#3280 to fix it.

Thanks! Is there any workaround to fix this in the meantime before your patch makes it into a release?

yacare555 commented 4 years ago

Hi @b-mueller, sent this #105 with a workaround to fix the dependency issue in the meantime.

muellerberndt commented 4 years ago

This is great, thanks! I'm getting TypeError: Profiler.resolveAllSources is not a function error now but anyway, I'll create a separate issue / bounty for that.

muellerberndt commented 4 years ago

@yacare555 the issue doesn't seem to be updating on Gitcoin, I think you have to change the status to "submitted" somehow? Right now I don't see a way of paying the bounty 😢

yacare555 commented 4 years ago

Hi @b-mueller, sorry, I forgot the submit to gitcoin, it's done now. Btw, if you create a bounty for the other issue, count with me to work on it.

muellerberndt commented 4 years ago

Hey @yacare555, I created a new bounty for the issue:

https://gitcoin.co/issue/b-mueller/sabre/106/100023582

yacare555 commented 4 years ago

Hey @yacare555, I created a new bounty for the issue:

https://gitcoin.co/issue/b-mueller/sabre/106/100023582

Thanks!

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.25 ETH (94.42 USD @ $377.67/ETH) attached to this issue has been approved & issued to @yacare555.