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

failed to sign with ledger: "context prefix is invalid" #40

Open
asardon opened this issue May 2, 2021 · 4 comments
Open

failed to sign with ledger: "context prefix is invalid" #40

asardon opened this issue May 2, 2021 · 4 comments

Comments

@asardon
Copy link

asardon commented May 2, 2021

Hi all,

I'm trying to execute the following command:

oasis-registry entity update \
  --signer.backend plugin \
  --signer.plugin.name ledger \
  --signer.plugin.config "wallet_id:$LEDGER_WALLET_ID,index:$LEDGER_INDEX" \
  --signer.plugin.path "$LEDGER_SIGNER_PATH" \
  --signer.dir $ENTITY_DIR_PATH \
  ../entity-metadata.json

However, I receive the following error:

You may need to review the transaction on your device if you use a hardware-based signer plugin...
ts=2021-05-02T21:06:51.676498349Z level=error module=cmd/entity caller=entity.go:47 msg="failed to sign metadata" err="signature/signer/plugin: failed to sign: ledger: failed to sign message: ledger/oasis: failed to sign: context prefix is invalid"

Any chance someone can help me resolve that error?

@asardon
Copy link
Author

asardon commented May 2, 2021

The ledger test cases produce the following error messages:

*** Building Go code...
*** Running CLI tests with Ledger signer...
*** Make sure your Ledger device is connected and the Oasis app is open.
+ OASIS_REGISTRY=/home/aetienne/Desktop/oasis/git/metadata-registry-tools/oasis-registry/oasis-registry
+ FIXTURES_DIR=/home/aetienne/Desktop/oasis/git/metadata-registry-tools/tests/fixtures/
+ [[ -n /home/aetienne/Desktop/oasis/oasis_core_ledger_1.2.0_linux_amd64/ledger-signer ]]
+ SIGNER=ledger
+ ENTITY_UPDATE_FLAGS=(--signer.dir ./ --signer.backend plugin --signer.plugin.name ledger --signer.plugin.path "$LEDGER_SIGNER_PATH" --skip-validation)
+ LEDGER_ERROR='signature/signer/plugin: failed to sign: ledger: failed to sign message: ledger/oasis: failed to sign:'
+ RED='\033[0;31m'
+ OFF='\033[0m'
++ mktemp -d --tmpdir oasis-registry-tests-XXXXXX
+ REGISTRY_DIR=/tmp/oasis-registry-tests-H1H7Vq
+ cd /tmp/oasis-registry-tests-H1H7Vq
+ /home/aetienne/Desktop/oasis/git/metadata-registry-tools/oasis-registry/oasis-registry init
Initialized metadata registry in /tmp/oasis-registry-tests-H1H7Vq
+ /home/aetienne/Desktop/oasis/git/metadata-registry-tools/oasis-registry/oasis-registry verify
+ update_entity_and_verify metadata.json valid
+ local fixture=metadata/metadata.json
+ local kind=valid
+ /home/aetienne/Desktop/oasis/git/metadata-registry-tools/oasis-registry/oasis-registry entity update --signer.dir ./ --signer.backend plugin --signer.plugin.name ledger --signer.plugin.path /home/aetienne/Desktop/oasis/oasis_core_ledger_1.2.0_linux_amd64/ledger-signer --skip-validation /home/aetienne/Desktop/oasis/git/metadata-registry-tools/tests/fixtures//metadata/metadata.json
++ tee cmd.out
You are about to sign the following entity metadata descriptor:
  Version: 1
  Serial:  1
  Name:    My entity name
  URL:     https://my.entity/url
  Email:   [email protected]
  Keybase: my_keybase_handle
  Twitter: my_twitter_handle

You may need to review the transaction on your device if you use a hardware-based signer plugin...
ts=2021-05-02T21:59:47.181681422Z level=error module=cmd/entity caller=entity.go:47 msg="failed to sign metadata" err="signature/signer/plugin: failed to sign: ledger: failed to sign message: ledger/oasis: failed to sign: context prefix is invalid"
+ [[ valid = \v\a\l\i\d ]]
+ print_error 'Valid entity update with fixture metadata/metadata.json should not fail.'
+ printf '\033[0;31mValid entity update with fixture metadata/metadata.json should not fail.\033[0m\n'
Valid entity update with fixture metadata/metadata.json should not fail.
+ exit 1
make: *** [Makefile:80: test-cli-ledger] Error 1

@dolphinmilk-org
Copy link

I'm experiencing the exact same error and output from the ledger test cases. I'm surprised that this was opened in early may without others reporting the same. Has there been a resolution to this or a cause identified?

@kostko
Copy link
Member

kostko commented Dec 5, 2021

For Ledger this requires the latest Ledger App version which is unfortunately still stuck in Ledger's review process.

@kostko
Copy link
Member

kostko commented Dec 5, 2021

See LedgerHQ/app-oasis#5.

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

No branches or pull requests

3 participants