Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS name resolution fails on android #3025

Closed
agazso opened this issue Jun 13, 2022 · 7 comments
Closed

DNS name resolution fails on android #3025

agazso opened this issue Jun 13, 2022 · 7 comments
Labels
bug Something isn't working issue

Comments

@agazso
Copy link
Member

agazso commented Jun 13, 2022

Context

The arm64 binary of bee can be run on android without any dependencies. However there is an error when starting bee, because it is not able to join to the swap-endpoint by name. The error seems to be that the DNS name resolution fails.

As a workaround we built a javascript proxy and run it on localhost and use the localhost address as a swap-endpoint, but it would be better if swarm would just run natively on android without problems.

Screenshot 2022-06-13 at 13 56 08

@agazso agazso added the needs-triaging new issues that need triaging label Jun 13, 2022
@bee-runner bee-runner bot added the issue label Jun 13, 2022
@agazso agazso added bug Something isn't working and removed needs-triaging new issues that need triaging labels Jun 13, 2022
@acud
Copy link
Member

acud commented Jun 21, 2022

can you try to change this in the makefile:
build: CGO_ENABLED=0 to build: CGO_ENABLED=1?

@mrekucci
Copy link
Contributor

@agazso would be possible to add more information about the hardware and OS? E.g.: was this tested on an emulator or real hardware (if so, what phone), what android version was used, etc...

@agazso
Copy link
Member Author

agazso commented Jun 22, 2022

can you try to change this in the makefile:
build: CGO_ENABLED=0 to build: CGO_ENABLED=1?

I did not build for myself but I downloaded this binary:
https://github.com/ethersphere/bee/releases/download/v1.6.1/bee-linux-arm64

I may try to build it later, but first I guess I will need to update the Go toolchain and it is not so fun on android :)

@agazso
Copy link
Member Author

agazso commented Jun 22, 2022

@agazso would be possible to add more information about the hardware and OS? E.g.: was this tested on an emulator or real hardware (if so, what phone), what android version was used, etc...

It was a real phone, Xiaomi Redmi 4X, running Android 9 and running Bee in Termux.

It seems that this is a known issue, I found this with a quick search:
golang/go#8877
Also:
https://github.com/klingtnet/golang-android-dns-problem

I guess @acud also found these, because his suggestion is similar to what others suggest in the linked issue (e.g. CGO_ENABLED=1)

@acud
Copy link
Member

acud commented Jun 23, 2022

I guess @acud also found these

Actually I haven't, but it is known that when compiling with CGO, some other DNS resolver gets dynamically linked 🤷 So it seemed like a possible workaround.

@acud
Copy link
Member

acud commented Jun 23, 2022

@istae
Copy link
Member

istae commented May 24, 2023

We have no plans to support android in the near future.
issue will be kept closed.

@istae istae closed this as completed May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue
Projects
None yet
Development

No branches or pull requests

4 participants