Android build fails very frequently

Please find the block stack of failure…

:app:bundleProductionReleaseFrontendTraceback (most recent call last):
File “scripts/fe-download.py”, line 105, in
** main()**
** File “scripts/fe-download.py”, line 92, in main**
** dl_frontend_path = download_frontend(frontend_environment, manifest)**
** File “scripts/fe-download.py”, line 37, in download_frontend**
** download_frontend_file(file_url, local_file_path)**
** File “scripts/fe-download.py”, line 42, in download_frontend_file**
** file_contents = urllib2.urlopen(file_url)**
** File “/usr/lib/python2.7/urllib2.py”, line 154, in urlopen**
** return opener.open(url, data, timeout)**
** File “/usr/lib/python2.7/urllib2.py”, line 429, in open**
** response = self._open(req, data)**
** File “/usr/lib/python2.7/urllib2.py”, line 447, in _open**
** ‘_open’, req)**
** File “/usr/lib/python2.7/urllib2.py”, line 407, in _call_chain**
** result = func(args)*
** File “/usr/lib/python2.7/urllib2.py”, line 1228, in http_open**
** return self.do_open(httplib.HTTPConnection, req)**
** File “/usr/lib/python2.7/urllib2.py”, line 1198, in do_open**
** raise URLError(err)**
urllib2.URLError: <urlopen error [Errno 110] Connection timed out>
** FAILED****

I have same script for iOS as well which always success.
In the setting I have different stack for Android and iOS.

For Android => Android & Docker, on Ubuntu 16.04
For iOS => xcode 8.3.x, on macOS 10.12 (Sierra)

Hi @yudhisthira8fit,

Base on “it works on macOS stack” I’d say the difference is most likely python version or similar.

You mentioned “it fails frequently”, so not always, right? If that’s the case, can you do a retry for that download? I might be wrong but from the log snippet you included here it seems to be a custom python script, so you should be able to add a retry there.

One more thing, using the Bitrise Build Cache might also help, as it can work as a second download source: http://devcenter.bitrise.io/caching/about-caching/

Hi @viktorbenei Thanks for reply.

It fails 8 times out of 10 times. I have already Bitrise caching enabled.

I will try to have retry logic in my python script. But this may not help me because I tried with immediately start of build.

Does any other download fail?

Asking because if no other network/download operation fails that means ~100% that the issue is with the script (or a dependency of the script, …)

or maybe the IP of our VM (running on google compute engine for Linux stacks, and in a private cloud for Mac stacks) is blocked by your server where you try to download from?