Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hardhat "uninitialized provider" issue #19

Closed
MathisGD opened this issue Jul 4, 2023 · 4 comments · Fixed by #146
Closed

Fix hardhat "uninitialized provider" issue #19

MathisGD opened this issue Jul 4, 2023 · 4 comments · Fixed by #146
Assignees

Comments

@MathisGD
Copy link
Contributor

MathisGD commented Jul 4, 2023

When using the latest version of hardhat and dependencies, yarn test is failing with this:

Error HH21: You tried to access an uninitialized provider. To initialize the provider, make sure you first call `.init()` or any method that hits a node like request, send or sendAsync.

For more info go to https://hardhat.org/HH21 or run Hardhat with --show-stack-traces
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It is fixed by using a modified yarn.lock file, but we should find a fix to use the latest version of hardhat.

Working yarn file: yarn.lock.txt
Diff: diff.txt

@Rubilmax
Copy link
Collaborator

Rubilmax commented Jul 4, 2023

I am aware of this and didn't find any workaround for now. Let's just use 2.15.

@MathisGD MathisGD changed the title Fix hardhat issue Fix hardhat "uninitialized provider" issue Jul 4, 2023
@MathisGD
Copy link
Contributor Author

MathisGD commented Jul 5, 2023

@MerlinEgalite is proposing a temporary workaround in #35

@MathisGD
Copy link
Contributor Author

MathisGD commented Jul 5, 2023

Not closing this, as it would be better to find a fix and use the last version of HH

@MathisGD
Copy link
Contributor Author

MathisGD commented Jul 5, 2023

NB: v2.16.0 of hardhat touches to providers so I'm not surprised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants