FTW hangs on "Downloading Resource Index" page

Bug #1409031 reported by Phill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
High
Ken Roberts

Bug Description

Running OpenLP for the "First Time" (after clearing the registry, appdata and program files) OpenLP hangs in the FTW on the "Downloading Resource Index" page. This prevents OpenLP from being started. The debug log does not contain any trackbacks or errors.

I suspect this is to do with a gateway, or firewall, or somethintg blocking OpenLP from connecting to the network.

Windows XP

Related branches

Phill (phill-ridout)
Changed in openlp:
importance: Undecided → High
description: updated
Revision history for this message
Phill (phill-ridout) wrote :

Debug Log Attached

Revision history for this message
Phill (phill-ridout) wrote :

I don't have a development environment set up here, but taking the try statement and exception handling code out of get_web_page (http://bazaar.launchpad.net/~openlp-core/openlp/trunk/view/head:/openlp/core/utils/__init__.py#L379) (line numbers are out in chrome) gives me:

Traceback (most recent call last):
  File "C:/Python33/gwp.py", line 82, in <module>
    get_web_page('http://openlp.org/files/frw/download.cfg')
  File "C:/Python33/gwp.py", line 64, in get_web_page
    page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
  File "C:\Python33\lib\urllib\request.py", line 156, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Python33\lib\urllib\request.py", line 475, in open
    response = meth(req, response)
  File "C:\Python33\lib\urllib\request.py", line 587, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python33\lib\urllib\request.py", line 513, in error
    return self._call_chain(*args)
  File "C:\Python33\lib\urllib\request.py", line 447, in _call_chain
    result = func(*args)
  File "C:\Python33\lib\urllib\request.py", line 595, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

Revision history for this message
Phill (phill-ridout) wrote :
Revision history for this message
Phill (phill-ridout) wrote :

Adding retries += 1 to the else clause fixes this, however, the code retries 4 times rather than 2 that is hard coded to CONNECTION_RETRIES. setting retries to 1 and the if condition to retries >= CONNECTION_RETRIES fixes the number of retries.

Finally the code calling get_web_page in the FTW is not in a try block so eventually openlp will bug out with the above exception. We should catch it displaying a friendly message to the user and allowing them to proceed with the rest of the FTW (obviously we should skip the download pages)

As mentioned I do not have a develpoment environment set up on the machine, so cannot try these things out in OpenLP, with my changes the code at http://bazaar.launchpad.net/~openlp-core/openlp/trunk/annotate/head:/openlp/core/utils/__init__.py#L404 becomes:

    retries = 1
    while True:
        try:
            page = urllib.request.urlopen(req, timeout=CONNECTION_TIMEOUT)
            log.debug('Downloaded URL = %s' % page.geturl())
        except (urllib.error.URLError, ConnectionError):
            if retries >= CONNECTION_RETRIES:
                log.exception('The web page could not be downloaded')
                raise
            else:
                retries += 1
                time.sleep(0.1)
                continue
        break

Ken Roberts (alisonken1)
Changed in openlp:
assignee: nobody → Ken Roberts (alisonken1)
status: New → In Progress
Tim Bentley (trb143)
Changed in openlp:
milestone: none → 2.1.2
status: In Progress → Fix Committed
Revision history for this message
Phill (phill-ridout) wrote :

This fixes OpenLP freezing. The FTW just bugs out now, and you still cannot proceed to run OpenLP.

https://bugs.launchpad.net/openlp/+bug/1409627

Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.