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

keystore list dies if no keystore setup #6317

Closed
kanej opened this issue Feb 17, 2025 · 2 comments
Closed

keystore list dies if no keystore setup #6317

kanej opened this issue Feb 17, 2025 · 2 comments
Assignees
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Milestone

Comments

@kanej
Copy link
Member

kanej commented Feb 17, 2025

On a new install running npx hardhat keystore list throws a type exception:

hardhat keystore list       
An unexpected error occurred:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Keystore.listUnverifiedKeys (/Users/kanej/projects/nomiclabs/hardhat-v3-alpha-testing/hardhat-getting-started-guide/node_modules/@ignored/hardhat-vnext-keystore/src/internal/keystores/keystore.ts:28:19)
    at list (/Users/kanej/projects/nomiclabs/hardhat-v3-alpha-testing/hardhat-getting-started-guide/node_modules/@ignored/hardhat-vnext-keystore/src/internal/tasks/list.ts:29:31)
    at async taskList (/Users/kanej/projects/nomiclabs/hardhat-v3-alpha-testing/hardhat-getting-started-guide/node_modules/@ignored/hardhat-vnext-keystore/src/internal/tasks/list.ts:14:3)
    at async main (/Users/kanej/projects/nomiclabs/hardhat-v3-alpha-testing/hardhat-getting-started-guide/node_modules/@ignored/hardhat-vnext/src/internal/cli/main.ts:185:5)

If you think this is a bug in Hardhat, please report it here: https://hardhat.org/report-bug
@kanej kanej added the v-next A Hardhat v3 development task label Feb 17, 2025
@kanej kanej added this to the Public Alpha milestone Feb 17, 2025
@kanej kanej added this to Hardhat Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Feb 17, 2025
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 17, 2025
@kanej kanej moved this from Backlog to To-do in Hardhat Feb 17, 2025
@kanej
Copy link
Member Author

kanej commented Feb 17, 2025

I can confirm, that this was because the I had an existing keystore.

On deleting the keystore file I am able to list and set my local keystore.

Note: on mac the keystore file is stored at: /Users/kanej/Library/Preferences/hardhat-nodejs/keystore.json

@kanej
Copy link
Member Author

kanej commented Feb 17, 2025

In HH2 the file is called vars.json, so we won't clash with keystore.json

@kanej kanej closed this as completed Feb 17, 2025
@github-project-automation github-project-automation bot moved this from To-do to Done in Hardhat Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Status: Done
Development

No branches or pull requests

2 participants