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: Opening New or Existing Empty Blog Post #2440

Closed
theck13 opened this issue Mar 24, 2020 · 13 comments
Closed

Crash: Opening New or Existing Empty Blog Post #2440

theck13 opened this issue Mar 24, 2020 · 13 comments

Comments

@theck13
Copy link

theck13 commented Mar 24, 2020

Expected

Opening a new or existing blog post that is empty will not crash.

Observed

Opening a new or existing blog post that is empty will crash. See the stack trace below for details.

Stack Trace
   --------- beginning of crash
2020-03-23 20:30:04.414 8159-8405/org.wordpress.android.beta E/AndroidRuntime: FATAL EXCEPTION: create_react_context
    Process: org.wordpress.android.beta, PID: 8159
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: dlopen failed: library "libc++_shared.so" not found
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
        at com.facebook.hermes.reactexecutor.HermesExecutor.(HermesExecutor.java:20)
        at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
        at java.lang.Thread.run(Thread.java:919)
2020-03-23 20:30:04.419 1788-8407/? E/ResolverController: No valid NAT64 prefix (101, /0)
2020-03-23 20:30:04.560 8159-8159/org.wordpress.android.beta E/WordPress-EDITOR: EditPostRepository: Transaction is writing on a locked thread [dalvik.system.VMStack.getThreadStackTrace(Native Method), java.lang.Thread.getStackTrace(Thread.java:1720), org.wordpress.android.ui.posts.EditPostRepository.reportTransactionState(EditPostRepository.kt:149), org.wordpress.android.ui.posts.EditPostRepository.access$reportTransactionState(EditPostRepository.kt:36), org.wordpress.android.ui.posts.EditPostRepository$updateAsync$1.invokeSuspend(EditPostRepository.kt:119), kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33), kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56), android.os.Handler.handleCallback(Handler.java:883), android.os.Handler.dispatchMessage(Handler.java:100), android.os.Looper.loop(Looper.java:214), android.app.ActivityThread.main(ActivityThread.java:7356), java.lang.reflect.Method.invoke(Native Method), com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492), com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)]
2020-03-23 20:30:04.770 8159-8159/org.wordpress.android.beta E/WordPress-EDITOR: EditPostRepository: Transaction is writing on a locked thread [dalvik.system.VMStack.getThreadStackTrace(Native Method), java.lang.Thread.getStackTrace(Thread.java:1720), org.wordpress.android.ui.posts.EditPostRepository.reportTransactionState(EditPostRepository.kt:149), org.wordpress.android.ui.posts.EditPostRepository.access$reportTransactionState(EditPostRepository.kt:36), org.wordpress.android.ui.posts.EditPostRepository$updateAsync$1.invokeSuspend(EditPostRepository.kt:119), kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33), kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56), android.os.Handler.handleCallback(Handler.java:883), android.os.Handler.dispatchMessage(Handler.java:100), android.os.Looper.loop(Looper.java:214), android.app.ActivityThread.main(ActivityThread.java:7356), java.lang.reflect.Method.invoke(Native Method), com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492), com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)]
2020-03-23 20:30:04.894 8159-8199/org.wordpress.android.beta E/Volley: [497] BasicNetwork.performRequest: Unexpected response code 400 for https://public-api.wordpress.com/rest/v1.1/sites/145499482/post/0/diffs/?locale=en_US
2020-03-23 20:30:04.907 8159-8159/org.wordpress.android.beta E/WordPress-API: Volley error on https://public-api.wordpress.com/rest/v1.1/sites/145499482/post/0/diffs/?locale=en_US
    com.android.volley.ClientError
        at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:199)
        at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)
        at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
        at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
2020-03-23 20:30:04.920 8159-8159/org.wordpress.android.beta E/WordPress-API: An error occurred while fetching History revisions
2020-03-23 20:30:04.962 8159-8159/org.wordpress.android.beta E/WordPress-EDITOR: A non-started editor session cannot be attempted to be ended

Reproduced

  1. Go to Sites tab.
  2. Tap Blog Posts item under Publish section.
  3. Tap Create a post floating action button.
  4. Notice crash.
  5. Tap Blog Posts item under Publish section.
  6. Tap Drafts tab.
  7. Tap (Untitled) post.
  8. Notice crash.
Tested

Google Pixel 2 on Android 10.0 with WordPress Android alpha-213

@gibtang
Copy link

gibtang commented Apr 17, 2020

The console log showed this error when I tried to replicate the issue

E/WordPress-API: An error occurred while fetching History revisions
E/Volley: [881] BasicNetwork.performRequest: Unexpected response code 400 for https://public-api.wordpress.com/rest/v1.1/sites/129970496/post/0/diffs/?locale=en_US
E/WordPress-API: Volley error on https://public-api.wordpress.com/rest/v1.1/sites/129970496/post/0/diffs/?locale=en_US
com.android.volley.ClientError
at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:199)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:131)
at com.android.volley.NetworkDispatcher.processRequest(NetworkDispatcher.java:111)
at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:90)
D/WordPress-API: Dispatching action: PostAction-FETCHED_REVISIONS
E/WordPress-API: An error occurred while fetching History revisions
E/FirebaseInstanceId: Token retrieval failed: INVALID_PARAMETERS

Could this be a possible reason of the crash?

@designsimply
Copy link
Contributor

I tried the testing steps using WPAndroid 14.7-rc-3 on Pixel 3 Android 10 and was unable to get the crash to happen.

I labeled the issue as gutenberg-mobile because of the references to libhermes.so in the stacktrace—although please let me know if that label is not correct. Aside: if we haven't already updated to RN 0.62 (can someone explain how to check on that?), do you think it would help? cc @hypest

Note: seems to match up with this crash report from Sentry:

Sentry Issue: WORDPRESS-ANDROID-7MW

UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/org.wordpress.android/lib-0/libc++_shared.so" is 32-bit instead of 64-bit
    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
    at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
...
(3 additional frame(s) were not displayed)

couldn't find DSO to load: libhermes.so caused by: couldn't find DSO to load: libc++_shared.so caused by: dlopen failed: "/data/data/org.wordpress.android/lib-0/libc++_shared.so" is 32-bit instead of 64-bit

@mchowning
Copy link
Contributor

Could this be a possible reason of the crash?

It seems pretty unlikely that is the cause, but the additional info is helpful. Thanks for reporting @gibtang !

Just confirming, but am I understanding correctly that this only happens with a new or empty post? So you can open a non-empty post with no issues? cc: @theck13

@mchowning
Copy link
Contributor

May be some relevant discussion here: facebook/react-native#25490

@theck13
Copy link
Author

theck13 commented May 2, 2020

@mchowning, I can't reproduce the crash with WordPress Android 14.7-rc-3.

@designsimply
Copy link
Contributor

99 events have been tracked for crash WORDPRESS-ANDROID-7MW in 14.7 and 14.7.1 since they were released 15d and 4d ago on May 15 and May 4 respectively.

Events: 511
Events in the last 15d for 14.7: 93
Events in the last 4d for 14.7.1: 6 (mainly Android 6.0 Infinix)
Users affected: 107
https://sentry.io/share/issue/5ee331bb9deb4ba1935b04396b01a880/

@designsimply
Copy link
Contributor

Events in the last 90d: 575
Events in the last 9d since 14.8 was released: 29
Users affected in the last 90d: 126
https://sentry.io/share/issue/5ee331bb9deb4ba1935b04396b01a880/

@designsimply
Copy link
Contributor

Events in the last 90d: 1,000
Users affected in the last 90d: 181
WORDPRESS-ANDROID-7MW: https://sentry.io/share/issue/5ee331bb9deb4ba1935b04396b01a880/

image

Events in the last 90d seem to be trending up.

@hypest
Copy link
Contributor

hypest commented Jun 29, 2020

This issue looks totally related to the RN integration of the block editor so, I'm moving it to the gutenberg-mobile repo.

@hypest hypest transferred this issue from wordpress-mobile/WordPress-Android Jun 29, 2020
@hypest
Copy link
Contributor

hypest commented Jun 29, 2020

I've set the "[Pri]" label to "Medium" as it looks like the issue is happening to very specific devices, mostly on TECNO devices.

@AmandaRiu AmandaRiu self-assigned this Aug 6, 2021
@AmandaRiu
Copy link
Contributor

I've attempted to reproduce this issue using a local build of WPAndroid from the develop branch and using a local gutenberg-mobile build from the develop branch on the following physical devices:

  • Pixel 4, Android 11
  • Samsung G6 (SM-G920T), Android 7
  • LG G5, Android 8

And didn't have any luck in reproducing it until I tried it on my LG G5, Android 8 by opening an existing post. Something special to note here, the app did not crash. I just happened to notice the error message in the logs:

2021-08-05 23:22:11.885 17007-17668/org.wordpress.android.beta E/SoLoader: couldn't find DSO to load: libhermes-executor-debug.so
        SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/org.wordpress.android.beta/lib-main flags = 1]
        SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/org.wordpress.android.beta-z2VIALgcbqeUADU0-Fuzpg==/lib/arm64 flags = 0]
        SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/vendor/lib64 flags = 2]
        SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
        Native lib dir: /data/app/org.wordpress.android.beta-z2VIALgcbqeUADU0-Fuzpg==/lib/arm64
     result: 0

I went back through my other test devices above - this time looking not for a crash, but for this error message and sure enough, I get it on every device, but only during the very first load of a post. I'll see the SoLoader error, but it's not fatal and it doesn't cause the app to crash.

Looking at the Sentry Crash Event for this issue, it appears the highest version of WPAndroid that actually crashed was 17.6.1. We upgraded to RN 0.64 in version 17.7 so it's possible a change was made that made the handing of this error not a crash? From the user's perspective nothing bad happened in the app. React native has an open PR for fixing this error, but it has yet to be merged and wouldn't be available until a future release.

I've set the Sentry event as "resolved as of 17.7" so we can track if there is a regression. @hypest do you think I should leave this ticket open for monitoring or just close it?

@AmandaRiu AmandaRiu removed their assignment Aug 12, 2021
@zwarm
Copy link

zwarm commented Aug 16, 2021

Quick update
I can confirm Amanda's findings above. 🙇
I tested locally and although the error (see below) shows in the logs, the app does not crash.
The RN ticket is still open in a triage status.

The sentry ticket was resolved by @AmandaRiu. I am going to close this ticket with the assumption that Sentry will highlight it again if the issue resurfaces as a crash in future releases.

2021-08-16 14:24:38.042 E/SoLoader: couldn't find DSO to load: libhermes-executor-debug.so
    	SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/org.wordpress.android.prealpha/lib-main flags = 1]
    	SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/org.wordpress.android.prealpha-TNW_4CpLKNS8Xfr_YZzEzA==/lib/x86 flags = 0]
    	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
    	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
    	Native lib dir: /data/app/org.wordpress.android.prealpha-TNW_4CpLKNS8Xfr_YZzEzA==/lib/x86
     result: 0

@zwarm zwarm closed this as completed Aug 16, 2021
@hypest
Copy link
Contributor

hypest commented Aug 23, 2021

@hypest do you think I should leave this ticket open for monitoring or just close it?

Late reply but I'd go with closing the ticket, and since @zwarm already covered that, we're good 👍. We can always re-open if new info comes in.

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

No branches or pull requests

7 participants