Skip to content

Error "Repo opening failed" on Android API 30+ #140

@jefft0

Description

@jefft0

Is there an existing issue for this?

  • I have searched the existing issues

Package version

v1.9.0

Language version and compiler version

go 1.18, javac 11

Bug description

  1. Connect a phone running Android 11+ (Android 30+) which has an external SD card.

  2. In the Java IPFS constructor, set internalStorage false. Change this line to:

    File externalDir = context.getExternalFilesDirs(null)[1];
    

(In my case, externalDir is /storage/C45B-552B/Android/data/null.example/files .)
3. Run the test app.

Current behavior

Logcat shows the error "IPFS start error: Node start failed: Repo opening failed" from this line.

Expected behavior

The app should prompt the user for permission to use the directory, and successfully open the repo.

Environment

macOS 10.15 on Samsung Galaxy S20, Android 12

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingverifiedBug is verified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions