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

[$4000] Identify source and fix crash: com.facebook.soloader.SoLoader.doLoadLibraryBySoName #9848

Closed
melvin-bot bot opened this issue Jul 12, 2022 · 63 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@melvin-bot
Copy link

melvin-bot bot commented Jul 12, 2022

Fatal Exception: java.lang.UnsatisfiedLinkError

couldn't find DSO to load: libhermes.so

SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.expensify.chat/lib-main flags = 1]
SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~TQymoaD6lIwlgPXCQPi3Tw==/com.expensify.chat-dV5g1giPTUH-ZkSuaAJlog==/lib/arm64 flags = 0]
SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
Native lib dir: /data/app/~~TQymoaD6lIwlgPXCQPi3Tw==/com.expensify.chat-dV5g1giPTUH-ZkSuaAJlog==/lib/arm64

result: 0

SoLoader.java line 918 com.facebook.soloader.SoLoader.doLoadLibraryBySoName

Number of Crashes: 90

Device Information

  • Platforms: Android
  • App Versions: 1.1.82-5
  • Devices: samsung SM-A326B 11

Stacktraces

Android 1.1.82-5
com.facebook.soloader.SoLoader.doLoadLibraryBySoName (SoLoader.java:918)
com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl (SoLoader.java:740)
com.facebook.soloader.SoLoader.loadLibraryBySoName (SoLoader.java:654)
com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:634)
com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:582)
com.facebook.hermes.reactexecutor.HermesExecutor.<clinit> (HermesExecutor.java:20)
com.facebook.hermes.reactexecutor.HermesExecutorFactory.create (HermesExecutorFactory.java:29)
com.facebook.react.ReactInstanceManager$5.run (ReactInstanceManager.java:1066)
java.lang.Thread.run (Thread.java:923)

Internal Firebase Info

💥 DO NOT EDIT THIS SECTION 💥

Crash IDs: 3851f750a3551753cfd665e72607ec8b
Exception: couldn't find DSO to load: libhermes.so SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.expensify.chat/lib-main flags = 1] SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/~~TQymoaD6lIwlgPXCQPi3Tw==/com.expensify.chat-dV5g1giPTUH-ZkSuaAJlog==/lib/arm64 flags = 0] SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2] SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2] Native lib dir: /data/app/~~TQymoaD6lIwlgPXCQPi3Tw==/com.expensify.chat-dV5g1giPTUH-ZkSuaAJlog==/lib/arm64 result: 0

@melvin-bot
Copy link
Author

melvin-bot bot commented Jul 18, 2022

Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Jul 18, 2022
@melvin-bot
Copy link
Author

melvin-bot bot commented Jul 20, 2022

Still overdue 6 days?! Let's take care of this!

@flodnv flodnv added Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2022
@melvin-bot melvin-bot bot removed the Overdue label Jul 25, 2022
@marcaaron marcaaron added the External Added to denote the issue can be worked on by a contributor label Aug 3, 2022
@melvin-bot melvin-bot bot added the Overdue label Aug 3, 2022
@melvin-bot
Copy link
Author

melvin-bot bot commented Aug 3, 2022

Triggered auto assignment to @dylanexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 Overdue labels Aug 3, 2022
@dylanexpensify
Copy link
Contributor

Update coming today!

@melvin-bot melvin-bot bot removed the Overdue label Aug 9, 2022
@dylanexpensify
Copy link
Contributor

@marcaaron could I get an updated title for this issue so I could get it on Upwork? Thanks man!

@marcaaron
Copy link
Contributor

All of these can probably just be renamed to Identify source and fix crash: [crash name]

@marcaaron marcaaron changed the title 💥 Crash 💥 com.facebook.soloader.SoLoader.doLoadLibraryBySoName Identify source and fix crash: com.facebook.soloader.SoLoader.doLoadLibraryBySoName Aug 10, 2022
@dylanexpensify
Copy link
Contributor

Nice, thanks man!

@dylanexpensify
Copy link
Contributor

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 11, 2022
@melvin-bot
Copy link
Author

melvin-bot bot commented Aug 11, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (Exported)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 11, 2022
@kevinksullivan
Copy link
Contributor

@dylanexpensify are we going ahead with doubling? Also, @luacmartins should we be adding the Needs Reproduction label here? Or how can we work on making this a more actionable issue?

@dylanexpensify dylanexpensify changed the title [$2000] Identify source and fix crash: com.facebook.soloader.SoLoader.doLoadLibraryBySoName [$4000] Identify source and fix crash: com.facebook.soloader.SoLoader.doLoadLibraryBySoName Nov 17, 2022
@dylanexpensify
Copy link
Contributor

Doubled, posted in #expensify-bugs here!

@rushatgabhane
Copy link
Member

rushatgabhane commented Nov 17, 2022

this needs reproduction steps

when was the last crash?

@JmillsExpensify
Copy link

@luacmartins To help clear out the extensive backlog of /App bugs, we're putting the spotlight on all bugs older than 4 weeks old. To help unblock the roadmap and get our bug pipeline back in equilibrium, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is
  • For any that can't, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #bug-zero

Thanks everyone!

@furkanuzundev
Copy link
Contributor

Hello guys,
I'm trying to detect issue almost 2 days, but it's looking weird.Here's steps;

1 - First of, i think that issue coming from com.facebook.soloader.SoLoader so i've updated it to the last version but nothing changed. https://github.com/facebook/SoLoader
2 - And then I kept searching. I tried to find exactly where the error was throwing. And it looks exactly like this;
https://github.com/facebook/SoLoader/blob/cc16d8960ece7e4c63de4bb22c086ed753280cc3/java/com/facebook/soloader/SoLoader.java#L1055

    try {
      if (sSoSources == null) {
        Log.e(TAG, "Could not load: " + soName + " because no SO source exists");
        throw new UnsatisfiedLinkError("couldn't find DSO to load: " + soName);
      }
    }

SoLoader is a native code loader for Android.But as you can see, it can't load the module that missing.

3 - I reviewed some issues and realized that a lot of people experienced this problem, especially after 0.64. Especially those who updated 0.70 saw this error frequently in the firebase console. You can review the references here:

facebook/react-native#35374
facebook/react-native#35323
facebook/react-native#35264
facebook/react-native#35222
facebook/react-native#35201
facebook/react-native#34089
facebook/react-native#33495

4 - Finally, I tried creating a react native application from scratch. If the problem is caused by the current state of the application, the application we created from scratch should be running without errors.

But what is that?

Screen Shot 2022-11-19 at 13 11 50

Probably the error is from hermes.

In the new architecture, we no longer use hermes as an npm package, but as an embedded. Therefore, we cannot make any changes to the package.

Also, the error only shows itself between Android 6-12 and .release version.

@melvin-bot melvin-bot bot added the Overdue label Nov 19, 2022
@Santhosh-Sellavel
Copy link
Collaborator

How to reproduce this one consistently @furkanuzundev ?

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2022
@furkanuzundev
Copy link
Contributor

@Santhosh-Sellavel

1 - create a new device from android studio before version 12.
2 - type react-native run-android --variant release on console
3 - Open Logcat from android studio, select debuggable phone and error section from combobox.
4 - Search couldn't find DSO to load to find error.

@Santhosh-Sellavel
Copy link
Collaborator

Cool, I am asking if can we get this reproduced on the live app.

@furkanuzundev
Copy link
Contributor

@Santhosh-Sellavel If we can try correct version, why not? But as i remember, firebase has delay while pushing error on console.if so, it might cause some trouble.

@furkanuzundev
Copy link
Contributor

By the way @Santhosh-Sellavel, app is not crush and closing completely as i'm tested.It's just throwing an error on console while opening.

@dylanexpensify
Copy link
Contributor

@luacmartins can you comment on this request?

@luacmartins
Copy link
Contributor

Coming back from ooo today, I posted an update here asking for more opinions on my decision. I'll come back to this issue this afternoon.

@luacmartins
Copy link
Contributor

Coming from that Slack thread. We will close this issue since:

  1. It seems like there's no crash and it doesn't affect users
  2. The error comes from hermes, but we no longer use it as an npm dependency, hence we can't fix the error. Hermes must be loaded as a peer dependency.
  3. The console error only shows up for older versions of android 6-12

@dylanexpensify let's pay @furkanuzundev for the investigation they did here and close the issue once done!

@trjExpensify
Copy link
Contributor

trjExpensify commented Nov 22, 2022

@dylanexpensify is out for the rest of the week. I'll reassign to myself to handle that, discussing internally here. Also going to assign @furkanuzundev for posterity.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 22, 2022
@melvin-bot
Copy link
Author

melvin-bot bot commented Nov 22, 2022

📣 @furkanuzundev You have been assigned to this job by @trjExpensify!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@trjExpensify
Copy link
Contributor

@furkanuzundev I've sent you a contract in Upwork. Let me know once you've received it and I'll close this out.

@furkanuzundev
Copy link
Contributor

@trjExpensify I accepted the contract. Thank you @Santhosh-Sellavel, @luacmartins for your efforts!

@trjExpensify
Copy link
Contributor

Perfect, settled!

@dreamGitBhargav
Copy link

Did you find any solution?

@MelvinBot
Copy link

📣 @dreamGitBhargav! 📣

Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Screen Shot 2022-11-16 at 4 42 54 PM

Format:

Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Linuhusainnk
Copy link

any solutions?

Copy link
Author

melvin-bot bot commented Nov 12, 2023

📣 @Linuhusainnk! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests