"[Errorno 2] temporary failure in name resolution" running APK with Wifi on & DNS resolution working

118 views
Skip to first unread message

João Matos

unread,
Nov 8, 2017, 2:18:10 PM11/8/17
to Kivy users support
Hello,

When running my Kivy app APK it always returns "[Errorno 2] temporary failure in name resolution".
If I run the same app with Kivy Launcher it works fine (and if running on my Windows desktop it also runs fine).

In both scenarios Wifi is on and working fine with DNS resolution.

This is the code where the problem occurs:
    LANG = 'pt-pt'
    METRIC = 'true'
    URL = ('http://dataservice.accuweather.com/forecasts/v1/daily/5day/{0}?'
               + 'language=' + LANG + '&metric=' + METRIC + '&details=true&apikey='
               + API_ID)

    location_id = '274015'
    UrlRequest(URL.format(location_id), on_error=self.upd_status, on_failure=self.upd_status, on_success=self.fill_grid)

The self.upd_status simply shows the error message in a Label.
The self.fill_grid fills the grid with the information received.

These are the only imports in the app:
from kivy.app import App
from kivy.network.urlrequest import UrlRequest
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label

I tried running in different Android phones (Android 4.1.1 and Android 5.1.1), with the same result.

I'm building the APK with buildozer 0.33 inside the VM provided by Kivy.

I tried "buildozer android debug deploy run logcat > my_log.txt" but couldn't find anything strange in the log file.


Thanks in advance,

JM

ZenCODE

unread,
Nov 8, 2017, 2:53:49 PM11/8/17
to Kivy users support
Please post that log file. Maybe we can find something strange...;-)

João Matos

unread,
Nov 9, 2017, 3:43:44 AM11/9/17
to Kivy users support
Hello,

Here it is.

Thanks,

JM

my_log.txt

João Matos

unread,
Nov 9, 2017, 10:39:41 AM11/9/17
to Kivy users support
Hello,

Just one more detail (I don't think it is important, but better safe than sorry).
On Android 4.1.1 the error message is [Errorno 2] temporary failure in name resolution.
On Android 5.1.1 the error message is [Errorno 4] non-recoverable failure in name resolution.

Thanks,

JM

ZenCODE

unread,
Nov 9, 2017, 12:58:28 PM11/9/17
to kivy-...@googlegroups.com
A thought. Is this possibly because you are not specifying internet permissions in your buildozer.spec file?

    android.permissions = INTERNET

João Matos

unread,
Nov 9, 2017, 1:37:19 PM11/9/17
to Kivy users support
Hello,

That was it.

Thank you very much,

JM

Omar karem

unread,
Jul 13, 2018, 6:31:15 PM7/13/18
to Kivy users support
Thanks ZenCODE, u made my day man

ZenCODE

unread,
Jul 13, 2018, 10:40:13 PM7/13/18
to Kivy users support
:-)
Reply all
Reply to author
Forward
0 new messages