trustwallet / trust-web3-provider

Web3 javascript wrapper provider for iOS and Android platforms.
https://trustwallet.com
742 stars 416 forks source link

TypeError: Cannot read properties of undefined (reading 'address') at TrustWeb3Provider.setConfig #355

Open PaulRBerg opened 1 year ago

PaulRBerg commented 1 year ago

I'm sorry if this is not the best place to ask this question, but we've had quite a few instances of the error in the title.

This is an unhandled error, so it originates outside of our repository (which is private). Based on the research that I did, I think that the origin of the error is the setConfig, specifically this function:

https://github.com/trustwallet/trust-web3-provider/blob/5843034b71ccc17e30aa5fb4c477ed1e371d7057/src/ethereum_provider.js#L48-L55

Now, I am not quite sure what causes this, because, to the best of our knowledge, we are not accessing any address on an undefined object. We're using typy to safely access object properties.

Do you have any clue as to what could be the cause here, or at least what should we do to prevent this error from happening in the future?

PaulRBerg commented 1 year ago

Hey @vikmeup, you should report and ban the user above with handle "Walletsupport". The Google Form they shared includes a field for scooping private keys:

Screenshot 2023-01-21 at 11 09 39 AM
vikmeup commented 1 year ago

Hey @vikmeup, you should report and ban the user above with handle "Walletsupport". The Google Form they shared includes a field for scooping private keys:

Screenshot 2023-01-21 at 11 09 39 AM

Thanks, reported to the GitHub and the team to take down this user/post.

AdamK222 commented 1 year ago

I'm experiencing the same issue in the React app, so far only 1 user had it on Chrome Mobile WebView v. 104.0.5112

hewigovens commented 1 year ago

Can you give more contexts how to reproduce this? like what is the dapp? Is it Android app or iOS app?

AdamK222 commented 1 year ago

I suppose it's related somehow to connectkit@1.1.3 dependency or wagmi@0.10.15. OS: Android 13 Handled: false Happens on: https://20lab.app/generate/general I don't know how to reproduce it for now because I have a little data.

PaulRBerg commented 1 year ago

@hewigovens in our case, this bug happens on web, specifically on pay.sablier.finance.