brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.84k stars 2.33k forks source link

[Android] Crash when claiming Brave Rewards BAT #20158

Open Waddlen opened 2 years ago

Waddlen commented 2 years ago

Description

Brave browser crashes when, in Brave Rewards, I click "CLAIM" next to "Your rewards from Ads are here!"

The following screen appears for about one second before crashing to the Android home screen: Brave_crash_screenshot

Steps to reproduce

  1. Navigate to chrome://rewards
  2. Click "CLAIM" button
  3. Brave crashes to home screen of Android

Actual result

Brave crashes.

Expected result

Rewards are added to wallet, Brave does not crash.

Issue reproduces how often

Reproduces 100% of the time

Version/Channel Information:

Device details

Brave version

1.33.106

Miyayes commented 2 years ago

Can you check if your phone passes Android SafetyNet? You can download a SafetyNet checker app and see if your phone passes. Although it shouldn't crash in any case, that's one error state that could result when pressing "Claim".

Waddlen commented 2 years ago

Can you check if your phone passes Android SafetyNet? You can download a SafetyNet checker app and see if your phone passes. Although it shouldn't crash in any case, that's one error state that could result when pressing "Claim".

Thanks for the quick response. I checked, my phone does not pass SafetyNet. Is this requirement necessary / is there a workaround to claim the BAT?

Miyayes commented 2 years ago

Thanks for the quick response. I checked, my phone does not pass SafetyNet. Is this requirement necessary / is there a workaround to claim the BAT?

SafetyNet is indeed a requirement/necessary for claiming BAT rewards. There is no workaround except to pass SafetyNet at this time. Thanks for your understanding.

SafetyNet will fail if, for example, your phone is rooted/has a custom OS, etc.

ScarletHg commented 2 years ago

Is it possible that Brave can either detect this and gracefully notify the user, rather than just crashing or silently failing out?

This also seems like something the user should be told up front when enabling Brave Rewards. Finding this out from a GitHub issue after over a month of usage is not a good experience, and fixing it would require wiping user data and losing earned BAT.

To add some more detail to the issue, it looks like Brave crashes when SafetyNet APIs are totally unavailable. In the case that SafetyNet APIs are available but do not pass, the user is sent in an endless loop of claiming BAT but no crash is observed.