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

crash changing orientation/scrolling through NTP after upgrading from profile that had news disabled after initially enabling #22777

Closed
kjozwiak opened this issue May 11, 2022 · 2 comments · Fixed by brave/brave-core#13297

Comments

@kjozwiak
Copy link
Member

kjozwiak commented May 11, 2022

Description

When upgrading from a profile that doesn't have the opt-in card enabled and a user already enabled and then disabled news, upgrading to a newer version will crash Brave if a user changes the orientation of the NTP and scrolls to the bottom and then back up.

Steps to reproduce

  1. install 1.39.67 Chromium: 101.0.4951.34 and skip all the initial onboarding
  2. enable Brave News via Settings (method of enabling news doesn't matter)
  3. once enabled scroll through the feed for a few seconds and disable Brave News via Settings
  4. close Brave and update to 1.40.44 Chromium: 101.0.4951.54
  5. ensure that your on a NTP and change the orientation to landscape
  6. while in landscape, scroll to the bottom and them back up to Stats & Top Tiles

You'll notice that after upgrading, portrait mode isn't scrollable but landscape is despite being fixed via brave/brave-core#13203.

@brave/qa-team some more cases outlined via brave/brave-core#13297 (comment) as well.

Actual result

    Process: com.brave.browser_nightly, PID: 16708
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
        at zB.a(chromium-MonochromePublic.apk-canary-414004423:1186)
        at androidx.recyclerview.widget.RecyclerView.o0(chromium-MonochromePublic.apk-canary-414004423:5550)
        at androidx.recyclerview.widget.c.run(chromium-MonochromePublic.apk-canary-414004423:5737)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1063)
        at android.view.Choreographer.doCallbacks(Choreographer.java:845)
        at android.view.Choreographer.doFrame(Choreographer.java:775)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1048)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8641)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)
2022-05-10 22:01:50.939 1130-4736/? I/ActivityManager: Process com.brave.browser_nightly:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0 (pid 16805) has died: fg  BTOP(834,2616)
2022-05-10 22:01:50.940 1130-4736/? W/ActivityManager: Scheduling restart of crashed service com.brave.browser_nightly/org.chromium.content.app.SandboxedProcessService0:0 in 1000ms for connection
2022-05-10 22:01:50.987 1130-2212/? W/ActivityManager: Exception when unbinding service com.brave.browser_nightly/org.chromium.content.app.PrivilegedProcessService0
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(BinderProxy.java:635)
        at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1881)
        at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:4711)
        at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:5155)
        at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:13830)
        at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3628)
        at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3826)
        at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1694)
        at android.os.IBinder$DeathRecipient.binderDied(IBinder.java:320)
        at android.os.BinderProxy.sendDeathNotice(BinderProxy.java:750)

Expected result

Brave shouldn't be crashing and the NTP shouldn't be scrollable when news has been disabled and a user is using in landscape mode.

Issue reproduces how often

100% reproducible using the above STR/Cases.

Version/Channel Information:

  • Can you reproduce this issue with the current Play Store version? N/A (not 100% sure but we never enabled the opt-in card)
  • Can you reproduce this issue with the current Play Store Beta version? Yes
  • Can you reproduce this issue with the current Play Store Nightly version? Yes

Device details

  • Install type (ARM, x86): ARM
  • Device type (Phone, Tablet, Phablet): Samsung S10+ (Phone)
  • Android version: Android 12

Brave version

Brave | 1.40.44 Chromium: 101.0.4951.54 (Official Build) canary (32-bit)
--- | ---
Revision | 67da1aeb32cedd27634ca6634fb79cbd85d3f0ab-refs/branch-heads/4951@{#1126}
OS | Android 12; Build/SP1A.210812.016

Website problems only

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? N/A
@kjozwiak
Copy link
Member Author

Quick note for @brave/qa-team re: the above. Even though the STR/Cases used 1.39.67 Chromium: 101.0.4951.34, we should also ensure that upgrading from the current 1.38.x build to the RC also works/doesn't cause the above crash.

@kjozwiak
Copy link
Member Author

Verification PASSED on Samsung S10+ running Android 12 using the following build(s):

Brave | 1.38.118 Chromium: 101.0.4951.67 (Official Build) (64-bit)
--- | ---
Revision | 8888ee7a24e2c36661ddb9536c35b7d4852a3a98-refs/branch-heads/4951@{#1230}
OS | Android 12; Build/SP1A.210812.016

Went through the STR/Cases outlined via #22777 (comment) but upgraded from 1.38.113 Chromium: 101.0.4951.61 -> 1.38.118 Chromium: 101.0.4951.67. Ensured that the crash wasn't occurring.

Verification PASSED on Samsung Galaxy Tablet A running Android 11 using the following build(s):

Brave | 1.38.118 Chromium: 101.0.4951.67 (Official Build) (64-bit)
--- | ---
Revision | 8888ee7a24e2c36661ddb9536c35b7d4852a3a98-refs/branch-heads/4951@{#1230}
OS | Android 11; Build/RP1A.200720.012

Went through the STR/Cases outlined via #22777 (comment) but upgraded from 1.38.113 Chromium: 101.0.4951.61 -> 1.38.118 Chromium: 101.0.4951.67. Ensured that the crash wasn't occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants