keplr-wallet icon indicating copy to clipboard operation
keplr-wallet copied to clipboard

Migrate to User-Agent Client Hints

Open arunadaybasu opened this issue 1 year ago • 1 comments

If you are currently using navigator.userAgent you should transition to preferring navigator.userAgentData before falling back to parsing the user-agent string.

if (navigator.userAgentData) {
  // use new hints
} else {
  // fall back to user-agent string parsing
}

This is the error that I am getting while using the Keplr extension library to make a wallet for the Archway blockchain.

image

I have tried checking whether it is a problem with arch3.js but I am using a dapp-example to make this frontend. You can check my repo from here.

Note - I am getting this error only during webpack npm run build. Not during npm run dev. So it's an issue in the build version.

The complete error from Google Chrome Console is:

image

Clicking on the Learn More takes me here: https://blog.chromium.org/2021/09/user-agent-reduction-origin-trial-and-dates.html

A possible solution is described in this article: https://web.dev/migrate-to-ua-ch/

arunadaybasu avatar Apr 14 '23 07:04 arunadaybasu

Can you describe in more detail what you think is the problem and how it should be fixed? It would be nice if you could use the bug issue format.

delivan avatar Apr 26 '23 08:04 delivan