Open Phips0812 opened 1 year ago
HI @Phips0812, thanks for the report! We have seen this happening a few times in the recent weeks but we have not been able to pinpoint what causes it. There have been no new Slither nor action releases in these last few days, so it's probably not something that changed in Slither or Crytic-compile. Have you upgraded anything else on your project recently? (e.g. solc version in your config, hardhat version, npm dependencies, node version in CI, etc?)
For reference, this is the code that invokes Hardhat. It uses communicate()
which should wait until the process exits, so it's possible Hardhat is just failing silently and not producing the artifacts:
https://github.com/crytic/crytic-compile/blob/master/crytic_compile/platform/hardhat.py#L177-L193
I see there is also this warning being printed from your Hardhat:
You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.
Please, make sure you are using a supported version of Node.js.
To learn more about which versions of Node.js are supported go to https://hardhat.org/nodejs-versions
If you could try using a supported version (see the node-version
option in the action to change it) and confirm if you can reproduce the issue still, that would be great.
Thanks again!
We get this too... (Example)
It doesn't happen consistently, so it sounds like a race condition of some kind.
Looking at the Hardhat issue tracker, this might be related: https://github.com/NomicFoundation/hardhat/issues/3877
@elopez thanks for the quick response! I will try to change to a supported node version asap.
However some more info: Like mentioned by @frangio this also happens randomly on our side. Sometimes if I rerun the GitHub Actions it works in the second or third run.
Same issue here. The only difference is that – so far – it happens always, not randomly, as mentioned above. I'm using slither-action v0.3.0 with latest Node LTS (18) + Solidity compiler v0.8.17
Regarding this error: You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.
All you need to do is add node's version when you are defining the step. Like this:
- name: Run Static Analysis (Slither)
uses: crytic/slither-action@v0.3.0
with:
node-version: 18
Setting the node-version for slither to 18.15 seems to fix this for now:
- name: Run Static analysis
uses: crytic/slither-action@v0.3.0
with:
node-version: 18.15
Thanks @frangio for the mentioned commit.
We also started seeing this issue recently with crytic/slither-action@0.2.0
. It occurs inconsistently.
I am using crytic/slither-action@v0.3.0 within my GitHub Actions and it worked like a charm until a few day ago.
Since it few days it's failing with the following error. I think it is related that one step is not waiting for the other as it can also be seen in the snippet below.
npx hardhat compile --force
is running and normally there should come the output of the compilation. However it directly tries to find/github/workspace/artifacts/build-info
which is not there yet.