Skip to content

Unclear MissingLibraryException when IOException occurs during getSupportedABIs() #107

@MrHadiSatrio

Description

@MrHadiSatrio

Similar to previous reports (#98, #93, and #88), we've encountered MissingLibraryException errors in Production that haven't been reproducible locally. The specific error message is:

Fatal Exception: com.getkeepsafe.relinker.MissingLibraryException: Could not find '<REDACTED>.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: [].

According to the source, there are three scenarios where an empty array might be returned from getSupportedABIs() (whose result is then used to construct the exception):

  1. sourceDirectories(context) returns empty.
  2. IOException occurs during ZipFile initialization.
  3. ZipFile doesn't contain matching library entries.

This report focuses on the second scenario. Currently, the error message doesn't provide any indication that the library might still be present despite the exception. While it wouldn't necessarily help resolve the root cause, a clearer message would reduce ambiguity for those investigating the issue.

Expected

getSupportedABIs() should specify whether or not it was able to look into all available directories without errors in addition to the detected ABIs, for example:

Fatal Exception: com.getkeepsafe.relinker.MissingLibraryException: Could not find '<REDACTED>.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: []. **Error encountered when trying to scan: [<source_dir_1>, <source_dir_2>, <source_dir_n>].**

Actual

Fatal Exception: com.getkeepsafe.relinker.MissingLibraryException: Could not find '<REDACTED>.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: [].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions