IPNS dns records not resolving on android

I am running an ipfs daemon on an android tablet. Works pretty well overall.

$ ./ipfs version
ipfs version 0.4.15

However, I have just noticed that resolving IPNS urls that use DNS TXT records does not work at all.

I don’t think that this is an android permissions issue, since I tried running ipfs from inside a termux session from which I can do dig -t TXT just fine.

$ dig -t TXT blog.klaehn.org
... "dnslink=QmXgLN697DWJU6mrZ8ffS6YYgYjv1yKd6RHqRXJMdqJu8J"

$ ipfs name resolve blog.klaehn.org
Error: could not resolve name

Is this a known limitation of the arm version or a bug?

What would I need to do to troubleshoot this? I looked at ipfs log ls, but have no idea what and where would be logged for the lookup.


How did you compile/install go-ipfs?

1 Like

I just did

wget http://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.15_linux-arm.tar.gz

Hm. Yeah, you probably need to recompile using the android target (that’s compiled for linux in general). Unfortunately, doing so is a bit of a pain (and may not work).

If you can, try creating a directory at /etc/resolve.conf (the directory part is important). You may be able to force go to use libc (maybe). However, this may also break other things on your system so be very careful.

1 Like

Honestly I was surprised how far we got with the generic arm binary. Since android is a very popular platform (probably more consumer-facing devices than x86), any chance to get official android builds?

I was trying to use the DNS TXT record approach as a workaround since for our application IPNS is currently not usable. If this also does not work we are kind of running out of options…

I’d love to but android builds require the android NDK, last time I checked. We really should, it’d just be a pain to implement.

OK, I might give it a try. Are there any recent instructions how to do it? I found that, but it is old: https://gist.github.com/ligi/92b9f89b382e641cc296ee18967a5ea5

I’ve never even tried. Every time I looked for instructions, I stopped caring and gave up. Sorry.

However, if you can get it working reproducibly and fetching the NDK can be automated, I’ll definitely try incorporating it into our distribution scripts.

I tried building go-ipfs 4.8.18 for android (target SDK level 26, 386). The daemon runs, but ipns lookup based on dns entries still fail.

Unfortunately, I cant draw any conclusion from the issue you linked above (https://github.com/golang/go/issues/8877). What would need to be done to get ipns over dns lookups working on Android?


1 Like

Just for the record: I used a direct dns lookup, extract the TXT record and go from there.