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

[bug] Unable to sign messages immediately after a successful connection on mobile devices #3601

Closed
michele-franchi opened this issue Jan 9, 2025 · 3 comments · May be fixed by #3708
Closed
Labels
bug Something isn't working needs review

Comments

@michele-franchi
Copy link

michele-franchi commented Jan 9, 2025

Link to minimal reproducible example

https://stackblitz.com/edit/vitejs-vite-9yovhwna?file=src%2Fmain.js

Summary

Expected Behavior:
After connecting a wallet, the user should be able to interact with it immediately, including signing messages, as soon as the account enters the connected state.

Current Behavior:
After connecting a wallet, the isConnected property of the account object is correctly set to true. However, attempting to call signMessage right after does not trigger a prompt in the wallet to perform the signing operation. Nothing happens and no errors are printed in the browser console.

This issue occurs predominantly on mobile devices, most of the times on Android. It appears there might be a delay between the completion of the connection phase and the wallet’s readiness to handle message signing. The problem is intermittent and varies across different Android mobile devices models.

The attached minimal reproducible example is based on https://github.com/reown-com/appkit/tree/main/examples/html-wagmi, with the simple addition to execute signMessage once the account enters the isConnected state.

I performed multiple tests with different Android devices, using up to date Chrome and Metamask and the packages listed below.

List of related npm package versions

appkit: 1.6.3
@wagmi/core: 2.x

Node.js Version

22.12.0

Package Manager

10.9.0

@michele-franchi michele-franchi added bug Something isn't working needs review labels Jan 9, 2025
@Sam-Newman
Copy link

hey @michele-franchi I just tried to repro this and was able to sign a message straight after connecting.

I am not 100% clear on the issue - please can you attach a screen recording so that I can see the incorrect behaviour ?

@magiziz magiziz linked a pull request Jan 20, 2025 that will close this issue
10 tasks
@magiziz
Copy link
Contributor

magiziz commented Jan 21, 2025

@michele-franchi Seems like the minimal reproducible example is not working properly. I think the preview domain needs to be whitelisted.

Image

I'm also not able to reproduce this in our HTML wagmi cdn example so i'll close this issue for now, but if you're still stuck please let me know and provide a working reproducible example.

@magiziz magiziz closed this as completed Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants