I ran into an error when running the test suite with dfx version above 0.12.0 but it worked when I used the 0.11.2 version
failed to parse secret key PEM from file /Users/dire.sol/.config/dfx/identity/icrc-ref-test/identity.pem:
A key was rejected by Ring: InvalidEncoding', test/runner/main.rs:56:9
I noticed the .pem file created for new identities in newer versions of dfx is different from the ones that were considered for the test suite.
The new version has this pattern:
-----BEGIN EC PRIVATE KEY-----
MCF...
-----END EC PRIVATE KEY-----
while the previous one has this:
-----BEGIN PRIVATE KEY-----
MCF...
-----END PRIVATE KEY-----
Steps to re-create
- Update
dfx to version 0.13.1
- create a new identity:
dfx identity new [identity-name]
dfx identity use [identity-name]
- Deploy the icrc-1 ref module
- Run the test suite with the newly created identity
cargo run --bin runner -- -u http://127.0.0.1:4943 -c $$CANISTER -s ~/.config/dfx/identity/$(dfx identity whoami)/identity.pem
I ran into an error when running the test suite with dfx version above
0.12.0but it worked when I used the0.11.2versionfailed to parse secret key PEM from file /Users/dire.sol/.config/dfx/identity/icrc-ref-test/identity.pem: A key was rejected by Ring: InvalidEncoding', test/runner/main.rs:56:9I noticed the
.pemfile created for new identities in newer versions ofdfxis different from the ones that were considered for the test suite.The new version has this pattern:
while the previous one has this:
Steps to re-create
dfxto version0.13.1dfx identity new [identity-name] dfx identity use [identity-name]