sakusaku3939 / DeepLAndroid

Unofficial Android App for DeepL Translator
MIT License
342 stars 19 forks source link

App fails to connect to DeepL server if using Private DNS with ad blocking #13

Closed erazemk closed 3 years ago

erazemk commented 3 years ago

When Private DNS (Android 9+) is enabled and connected to an ad blocking server (e.g. dns.adguard.com), the app cannot connect to the DeepL server, even though the DeepL website works fine if it's enabled. I have not tested with other DNS providers, but the problem might affect them too.

I am using Firefox as my browser, so the engine isn't WebWiew, the problem might be there or in the way the app connects to the server.

If needed I can provide a logcat.

To recreate:

noodlejetski commented 3 years ago

I checked my NextDNS logs and it seems that s.deepl.com is being blocked. if I whitelist it, it connects without issues. no idea what does that URL do though, or why it's not an issue when connecting to the website via Firefox.

BluePixel4k commented 3 years ago

I have the same problem. I think that s.deepl.com is used for the statistics.

erazemk commented 3 years ago

Could it be that the app stops trying to connect if one of the connections fails?

peterge1998 commented 3 years ago

I am using Adaway and it also doesnt allow the connection in this app

sakusaku3939 commented 3 years ago

I was able to reproduce the error, so I investigated the logs. The reason was that the sending process to the DAP server failed only when Adguard DNS was used, and onReceivedError was called. However, since there was no problem with the connection to the DeepL server itself, the problem was solved by modifying the code on the application side.

https://github.com/sakusaku3939/DeepLAndroid/releases/tag/v3.5

erazemk commented 3 years ago

Can confirm the latest version doesn't have the problem anymore. I'll keep the issue open until the new version is published to Izzy's F-Droid repo in case someone else has the same problem, so it doesn't get resubmitted.