Skip to content

Add troubleshooting for "couldn't find DSO to load" - #159

Open
ZainnQureshii wants to merge 1 commit into
meta:mainfrom
ZainnQureshii:docs/dso-troubleshooting
Open

ZainnQureshii wants to merge 1 commit into
meta:mainfrom
ZainnQureshii:docs/dso-troubleshooting

Conversation

@ZainnQureshii

Copy link
Copy Markdown

Fixes #114

Summary

Adds a short "Troubleshooting" section to the README for the couldn't find DSO to load error. It covers what the error means, where to see which sources SoLoader tried (the existing SO sources and Native lib dir lines that SoLoaderDSONotFoundError.create already adds), how to check that the library is packaged under the device's ABI (unzip -l), and two reasons a library that is in the APK can still end in this error:

  • DirectApkSoSource only indexes entries stored uncompressed (entry.getMethod() == ZipEntry.STORED, DirectApkSoSource.java:215-218), so a compressed .so is skipped by that source. unzip -lv shows the method.
  • When loading an APK entry throws UnsatisfiedLinkError, DirectApkSoSource logs it as a warning and tries the next path (DirectApkSoSource.java:85-90), so the final message can hide a linker error such as a missing dependency.

Every statement was checked against the source on current main; nothing in the section goes beyond what the loader does.

Test plan

Docs only. To check the compressed-entry case, compiled the unchanged DirectApkSoSource against two ZIP fixtures holding lib/arm64-v8a/libhermes.so, one stored and one deflated, with the loader stubbed: the stored entry reached the loader (and its UnsatisfiedLinkError warning), the deflated one was skipped with no loader call.

A Copilot review pointed out that Native lib dir is printed whenever a context exists, even when no source searches it, so the section describes it as the app's native library directory rather than a searched path.

Prepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.

🤖 Generated with Claude Code

Explain what the error means, how to check where SoLoader searched and
whether the library is packaged for the device's ABI, and why a present
APK entry can still end in this error (compressed entries are skipped by
DirectApkSoSource, and a linker error makes it move on).

Fixes meta#114

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed label Nov 12, 2026
@ZainnQureshii

Copy link
Copy Markdown
Author

Hey @cortinico @javache, could one of you take a look at this when you get a chance? This adds a short guide for couldn't find DSO to load that shows how to check the APK for the library and find the original linker error in the logs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add troubleshooting docs for "couldn't find DSO to load" errors

1 participant