ipfs-shipyard / gomobile-ipfs

IPFS and libp2p on Mobile, with Gomobile
Other
319 stars 62 forks source link

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

Open jefft0 opened 1 year ago

jefft0 commented 1 year ago

Is there an existing issue for this?

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 .)

  1. 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