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

WalletNotReadyError on page refresh with autoconnect=true #61

Open
flappys opened this issue Oct 12, 2022 · 4 comments
Open

WalletNotReadyError on page refresh with autoconnect=true #61

flappys opened this issue Oct 12, 2022 · 4 comments

Comments

@flappys
Copy link

flappys commented Oct 12, 2022

With autoconnect enabled to true and wallet connected, we get WalletNotReadyError on page refresh. It redirects to the chrome extension page of that connected wallet.

Console output:

selectedWallets {adapter: MartianWalletAdapter, readyState: 'NotDetected'}
App.tsx:56 wallet errors:  WalletNotReadyError
    at WalletProvider.tsx:243:1
    at commitHookEffectListMount (react-dom.development.js:23150:1)
    at commitPassiveMountOnFiber (react-dom.development.js:24926:1)
    at commitPassiveMountEffects_complete (react-dom.development.js:24891:1)
    at commitPassiveMountEffects_begin (react-dom.development.js:24878:1)
    at commitPassiveMountEffects (react-dom.development.js:24866:1)
    at flushPassiveEffectsImpl (react-dom.development.js:27039:1)
    at flushPassiveEffects (react-dom.development.js:26984:1)
    at react-dom.development.js:26769:1
    at workLoop (scheduler.development.js:266:1)
@tom-hippo
Copy link
Contributor

Can you provide more info of the issue / try the latest version of the adapter? I can't reproduce the issue in wallet-tester

@flappys
Copy link
Author

flappys commented Oct 13, 2022

Steps followed: node -version: v18.7.0

  1. git clone https://github.com/hippospace/aptos-wallet-adapter.git
  2. copy the wallet tester folder and to another directory
  3. update the package.json with "@manahippo/aptos-wallet-adapter": "^0.4.9"
  4. yarn start - and then select autoconnect to true, login and then refresh.
  5. It opens a tab with the above error.

Also not related to this. The code used to verify signed mesaage needs a little change. The signature that is returned from martian contains a '0x' and it needs to be removed before calling the nacl verify.

@flappys
Copy link
Author

flappys commented Oct 15, 2022

Update: Just wanted to be sure if I was doing some mistake using the adapter. Went back to 0.4.0 till 0.4.3 and everything worked fine. Updated the package to 0.4.4 and boom the error happened.

Reason:
8741314#diff-6ee148f955478e563170a98d7cd134d54dd80c9ad95bced15a5e411afc8d90a2

@tom-hippo
Copy link
Contributor

Got it. will restore to the previous version and figure out the best solution for this part

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

2 participants