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

Error message is Uint8Array #3356

Closed
JGiter opened this issue Sep 13, 2022 · 3 comments
Closed

Error message is Uint8Array #3356

JGiter opened this issue Sep 13, 2022 · 3 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@JGiter
Copy link

JGiter commented Sep 13, 2022

Ethers Version

5.7.0

Search Terms

Uint8Array error message signMessage

Describe the Problem

Steps to reproduce:

  • Create signer from Metamask provider
  • call signMessage
  • cancel sign request in Metamask

Expected: Error which contains Logger.errors.ACTION_REJECTED
Actual: error, which message is Uint8Array, like Error: 7,110,130,108,205,33,255,168,114,250,162,193,63,185,163,200,64,186,67,34,164,24,83,246,214,243,221,231,33,218,203,25

Code Snippet

import detectMetamask from '@metamask/detect-provider';

const metamaskProvider: any = await detectMetamask({
    mustBeMetaMask: true,
  });
// initialize metamaskProvider
const signer = new providers.Web3Provider(provider).getSigner();

Contract ABI

No response

Errors

No response

Environment

Other (please specify)

Environment (Other)

Volta https://volta-rpc.energyweb.org

@JGiter JGiter added the investigate Under investigation and may be a bug. label Sep 13, 2022
@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. and removed investigate Under investigation and may be a bug. labels Sep 14, 2022
@ricmoo
Copy link
Member

ricmoo commented Sep 14, 2022

That was a fun and confusing one to track down. :)

I was overwriting the message property on Error, with the message to sign (after it was converted to bytes).

The CI is currently running, and once it passes I'll publish it.

@ricmoo
Copy link
Member

ricmoo commented Sep 14, 2022

This has been fixed in [v5.7.1](release: https://github.com/ethers-io/ethers.js/releases/tag/v5.7.1). Try it out and let me know if you still have any problems.

Thanks! :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Sep 14, 2022
@JGiter
Copy link
Author

JGiter commented Sep 14, 2022

Thanks for looking at this! The issue is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants