question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metamask is connected but signer is absent

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

0.0.3

Current Behavior

I’m developing primarily against Metamask, and I’ve noticed that if I return to the project after a day or so (maybe I reset my computer), I find my project in a state where account is present, but signer is null.

For example, in this state, this code…

const Wallet = () => {
  const { data: account } = useAccount();
  const { data: signer } = useSigner();

  console.log('account', account);
  console.log('signer', signer);

Will produce these logs: image

I have noticed that this case is when Metamask is re-prompting for password:

image

Expected Behavior

I’m under the impression that account and signer should both be present, or both absent; but never partially. (This may be a misunderstanding on my part).

Steps To Reproduce

I’m pretty sure that restarting MacOS will require that Metamask wants you to reconfirm your password.

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

It’s most likely that this is expected behavior, given that it seems to be related to Metamask’s internals. But my question for this library is – how do you practically help a user recover from this state? What’s wagmi’s expected UX here for this case?

THANK YOU SO MUCH FOR THIS LIBRARY IT IS FANTASTIC

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tmmcommented, May 20, 2022

very soon! been delayed with some other work this week.

1reaction
hhffcommented, May 12, 2022

Thank you @tmm - will check back when a new release is cut to validate it’s working as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signing Data - MetaMask Docs
If you have trouble logging in to a website or dapp when using a Ledger or Trezor, the site may be requesting you...
Read more >
Understanding and resolving MetaMask error codes
This error means the user is not connected to the appropriate chain for that transaction. For example, if a transaction requires the user...
Read more >
Does not receive any callback after signing message. #462
MetaMask has connection issue . Its showing return to the browser toast on MetaMask app but the connector.connected is always false.
Read more >
One-click Login with Blockchain: A MetaMask Tutorial - Toptal
One-click social logins via Facebook, Google, or GitHub are better, but they come with data privacy trade-offs. This article introduces a one-click, ...
Read more >
Solving a MetaMask connection issue - Ledger Support
If the issue persists, try resetting your Metamask account by going to Settings > Advanced > Reset Account. Once your account is reset,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found