wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.92k stars 1.3k forks source link

JniAndroid$UncaughtExceptionException: Native stack trace: #20147

Open sentry-io[bot] opened 3 months ago

sentry-io[bot] commented 3 months ago

Sentry Issue: JETPACK-ANDROID-J3B

Surface$OutOfResourcesException: None
    at android.view.SurfaceControl.nativeCreate(SurfaceControl.java)
    at android.view.SurfaceControl.<init>(SurfaceControl.java:1038)
    at android.view.SurfaceControl.<init>(SurfaceControl.java:86)
    at android.view.SurfaceControl$Builder.build(SurfaceControl.java:693)
    at android.view.View.startDragAndDrop(View.java:27229)
...
(8 additional frame(s) were not displayed)

JniAndroid$UncaughtExceptionException: Native stack trace:
#00 pc 0x0000000003cb82b7 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#01 pc 0x0000000002bb566f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#02 pc 0x0000000002bb4d57 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#03 pc 0x0000000007073447 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#04 pc 0x00000000054fdd1f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#05 pc 0x00000000053b8b63 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#06 pc 0x00000000053956f3 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#07 pc 0x0000000003984603 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#08 pc 0x0000000002bd169f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#09 pc 0x0000000002bd0f6b /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#10 pc 0x0000000002bd121f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#11 pc 0x0000000002a7b41f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#12 pc 0x0000000002a7b2d7 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#13 pc 0x0000000002b6bc4f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#14 pc 0x0000000002b6696f /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#15 pc 0x0000000003aa3bc3 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#16 pc 0x0000000003aa3b47 /data/app/~~edjQkLFlZwvqNMeJWfgDKw==/com.google.android.trichromelibrary_616714333-9frhU_h0WwVrsnVaP0qSbg==/base.apk (offset 0x8dc000)
#17 pc 0x000000000000b067 /system/lib64/libutils.so
#18 pc 0x000000000000ac6b /system/lib64/libutils.so
#19 pc 0x000000000007cb3f /system/lib64/libandroid_runtime.so

    at org.chromium.base.JniAndroid.handleException(chromium-TrichromeWebViewGoogle6432.aab-stable-616714333:11)
    at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
    at android.os.MessageQueue.next(MessageQueue.java:335)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:8131)
...
(3 additional frame(s) were not displayed)
sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2TTG

sentry-io[bot] commented 3 months ago

Sentry issue: JETPACK-ANDROID-HNP

sentry-io[bot] commented 3 months ago

Sentry issue: JETPACK-ANDROID-HN0

sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2T29

SiobhyB commented 3 months ago

Noting that this often appears as a new crash due to the fact it comes up in numerous different areas. All of these Sentry reports show a comment Resources$NotFoundException: Resource ID #0x90c0006 error in the logs, indicating a common resource issue. Setting the priority as Medium. It's tricky to determine the specific number of times this has occurred, but there are numerous Sentry reports indicating that this is a fairly widespread issue.

sentry-io[bot] commented 3 months ago

Sentry issue: JETPACK-ANDROID-FQB

sentry-io[bot] commented 3 months ago

Sentry issue: JETPACK-ANDROID-J8R

sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2V0V

sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2V85

sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2TKN

sentry-io[bot] commented 3 months ago

Sentry issue: WORDPRESS-ANDROID-2V5H

derekblank commented 3 months ago

I collected all the reports of JniAndroid$UncaughtExceptionException from Sentry and linked all of the ones I could find that included Resources$NotFoundException that seemed related:

Issue Events Users
WORDPRESS-ANDROID-2T29 172 126
JETPACK-ANDROID-FQB 191 141
JETPACK-ANDROID-J8R 1 1
JETPACK-ANDROID-HNP 32 28
WORDPRESS-ANDROID-2TTG 24 24
WORDPRESS-ANDROID-2V0V 3 3
WORDPRESS-ANDROID-2V85 1 1
JETPACK-ANDROID-J3B 1 1
JETPACK-ANDROID-HN0 13 13
WORDPRESS-ANDROID-2TKN 7 7
WORDPRESS-ANDROID-2V5H 6 6
451 351

While this often appears as a new crash as @SiobhyB noted, the oldest issue I could find first appeared in 23.7.1. Keeping Medium Priority per the matrix.

antonis commented 3 months ago

Given that the crash is affecting app versions as old as 21.5 I think that the recent surge is unlikely related with our app. The stack trace of the crash

android.content.res.Resources$NotFoundException: Resource ID #0x20c0006
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:254)
    at android.content.res.Resources.getInteger(Resources.java:1209)
    at org.chromium.ui.base.DeviceFormFactor.isTablet(chromium-TrichromeWebViewGoogle6432.aab-stable-616714333:9)

also looks similar with this Google issue but I opened a new one since the recent crashes might indicate that a recent WebView version is causing this.

antonis commented 3 months ago

Checking the issue on Android Vitals the spike started on January 26th around the time that 121.0.6167 version of WebView was released.

Screenshot 2024-02-13 at 10 37 47 AM
antonis commented 3 months ago

Just a heads up that the issue on the Google tracker is marked as New and is being investigated 🤞

antonis commented 3 months ago

Following up on our discussion (ref p1708008049877909/1707711421.715029-slack-C012H19SZQ8) and the responses from Google we think that the issue is more of a crash reporting change and not a new crash. I'll keep the issue open and continue monitoring how the crashes trend evolves.

antonis commented 2 months ago

While investigating this issue I noticed that some of the Chromium related crashes appear when we try to get the default user agent

Screenshot 2024-02-23 at 2 18 29 PM

We can probably avoid this type of crash by catching the RuntimeException thrown and provide a "default" default user agent. A question would be what an appropriate "default" user agent would be so that our API and WebViews work as expected 🤔

edit: raised for discussion internally pcdRpT-5Us-p2

sentry-io[bot] commented 2 months ago

Sentry Issue: WORDPRESS-ANDROID-2VFY

This issue is an ANR but it seems to have been caused by the same root cause related to the chromium library. I'm linking to this issue so we can have the full investigation history about the main root cause and the possible solutions and workarounds implemented.

sentry-io[bot] commented 2 months ago

Sentry Issue: JETPACK-ANDROID-JSB

sentry-io[bot] commented 2 months ago

Sentry Issue: JETPACK-ANDROID-JVQ

antonis commented 2 months ago

Following up on our discussion (ref p1708008049877909/1707711421.715029-slack-C012H19SZQ8) and the responses from Google we think that the issue is more of a crash reporting change and not a new crash. I'll keep the issue open and continue monitoring how the crashes trend evolves.

I took another snapshot of the old and the new crash report numbers and I believe that our overall crash rate is not affected significantly since the spiking new issue almost matches the drop of crashes in the old issue.

Screenshot 2024-03-01 at 12 10 56 PM Screenshot 2024-03-01 at 12 10 38 PM

I think there is no action on our side other than expecting the new WebView M123 sometime in mid-March.

sentry-io[bot] commented 1 month ago

Sentry Issue: JETPACK-ANDROID-HPJ

sentry-io[bot] commented 1 month ago

Sentry Issue: WORDPRESS-ANDROID-2WA6

sentry-io[bot] commented 1 month ago

Sentry Issue: JETPACK-ANDROID-MPQ

sentry-io[bot] commented 1 month ago

Sentry Issue: WORDPRESS-ANDROID-2WA4

antonis commented 1 month ago

I think there is no action on our side other than expecting the new WebView M123 sometime in mid-March.

The expected new Webview release arrived a few days ago. There is no change in the recorder crashes yet but it may take some time to rollout and notice a difference 🤞

sentry-io[bot] commented 1 month ago

Sentry Issue: JETPACK-ANDROID-KAM

antonis commented 1 month ago

The expected new Webview release arrived a few days ago. There is no change in the recorder crashes yet but it may take some time to rollout and notice a difference 🤞

I've added the webview version in the crash reports with https://github.com/wordpress-mobile/WordPress-Android/pull/20533 to be able to measure if the new release has an impact on the crashes.

sentry-io[bot] commented 1 month ago

Sentry Issue: WORDPRESS-ANDROID-2VYY

antonis commented 1 month ago

While investigating this issue I noticed that some of the Chromium related crashes appear when we try to get the default user agent

The WORDPRESS-ANDROID-2VYY ANR is related to the fix :( The ANR is related to a know limitation of the getDefaultUserAgent call https://issuetracker.google.com/issues/289118199#comment9

I'll track the user agent retrieval related ANRs in https://github.com/wordpress-mobile/WordPress-Android/issues/12259

antonis commented 4 weeks ago

I've added the webview version in the crash reports with https://github.com/wordpress-mobile/WordPress-Android/pull/20533 to be able to measure if the new release has an impact on the crashes.

The crashes from 24.6 show that the bug persists in the latest WebView versions :(

WordPress Jetpack
Screenshot 2024-04-16 at 10 42 03 AM Screenshot 2024-04-16 at 10 41 52 AM
veloso14 commented 3 weeks ago

Following this....

sentry-io[bot] commented 5 days ago

Sentry Issue: JETPACK-ANDROID-QC5

thomashorta commented 5 days ago

A lot of people still complaining in the Google Issue Tracker that the crash is still happening in recent versions of WebView.

It looks like a new ticket was opened related to that, but I don't have access to it, so it's hard to track if they are working on a fix.

antonis commented 5 days ago

It looks like a new ticket was opened related to that, but I don't have access to i

I do not have access to the new issue either and left a follow up comment.

sentry-io[bot] commented 2 days ago

Sentry Issue: WORDPRESS-ANDROID-2XTT

sentry-io[bot] commented 6 hours ago

Sentry Issue: JETPACK-ANDROID-RT0