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.

Make dapp detection accurate

See original GitHub issue

Description

Detecting ‘Installing a Crypto Wallet’ by using a getter on window.web3 is inaccurate and misleading to users. For sites like ours, we want to keep track of globals, and something as simple as

Object.getOwnPropertyNames(window).forEach(key => window[key])

Triggers this message, which recurs even if a user clicks ‘Deny’. It’s a product that has nothing to do with crypto and this message is incorrect at least and a problem for user trust.

You could:

  • Make the property non-enumerable
  • Drop this check

Or something else. For now we’ll have to hardcode a workaround into our app to make it avoid web3.

Steps to Reproduce

  1. Object.getOwnPropertyNames(window).forEach(key => window[key])

Actual result:

A dapp is detected.

Expected result:

A dapp is not detected.

Reproduces how often:

Always

Brave version (brave://version info)

All

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? No

Pulled from #718

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tmcwcommented, Dec 20, 2019

I can confirm that it is still an issue, still replicable with the one-line trigger. https://gainful-beechnut.glitch.me/

0reactions
ryanmlcommented, Dec 7, 2020

We are going to be removing the dapp infobar for the time being, so closing this for now. ref: We are going to be removing the dapp infobar for the time being, so closing this for now, but in future iterations this will be top priority for the feature, thanks! ref: https://github.com/brave/brave-core/pull/7321

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ensure the quality of smart contracts in decentralized ...
Testing is the best way for using the contract in different situations without any risk to make sure it's working properly. Here are...
Read more >
Accurate Decentralized Application Identification via ...
DApp fingerprinting can identify users' visits to specific DApps by analyzing the resulting network traffic, revealing much sensitive ...
Read more >
The BEST way to detect Metamask in your dApp - YouTube
Become an in-demand blockchain MASTER:https://dappuniversity.com/bootcamp CODE: https://github.com/dappuniversity/metamask_detector.
Read more >
Automated Dapp Testing feat Roman Storm - YouTube
SUBSCRIBE TO THIS CHANNEL ◅Subscribe to become a highly paid blockchain developer: ...
Read more >
Revealing the Secret Blockchain DApp World of Bots (Part 1 ...
AI has built a highly accurate deep learning model to detect them at scale, ... Figure 8: EOS DApp Bot Blockchain Transactions (addresses...
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