bzr: ERROR: httplib.IncompleteRead: IncompleteRead(0 bytes read)

Bug #1807226 reported by Ajit on 2018-12-06
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Bazaar
Undecided
Unassigned

Bug Description

> bzr branch lp:addons-hr-ng
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: httplib.IncompleteRead: IncompleteRead(0 bytes read)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 930, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1141, in run_bzr
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 697, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1489, in run
  File "C:/Program Files (x86)/Bazaar/plugins\git\dir.py", line 140, in sprout
  File "C:/Program Files (x86)/Bazaar/plugins\git\fetch.py", line 713, in fetch_objects
  File "C:/Program Files (x86)/Bazaar/plugins\git\remote.py", line 434, in fetch_objects
  File "C:/Program Files (x86)/Bazaar/plugins\git\remote.py", line 424, in fetch_pack
  File "C:/Program Files (x86)/Bazaar/plugins\git\remote.py", line 237, in fetch_pack
  File "dulwich\client.pyo", line 761, in fetch_pack
  File "dulwich\client.pyo", line 396, in _handle_upload_pack_tail
  File "dulwich\client.pyo", line 266, in _read_side_band64k_data
  File "dulwich\protocol.pyo", line 150, in read_pkt_seq
  File "dulwich\protocol.pyo", line 101, in read_pkt_line
  File "socket.pyo", line 377, in read
  File "httplib.pyo", line 522, in read
  File "httplib.pyo", line 565, in _read_chunked
IncompleteRead: IncompleteRead(0 bytes read)

bzr 2.6b1 on python 2.6.6 (Windows-post2008Server-6.2.9200)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'branch', 'lp:addons-
    hr-ng']
plugins: bzrtools[2.5.0], changelog_merge[2.6b1], colo[0.4.0],
    explorer[1.3.0dev], fastimport[0.14.0dev], git[0.6.8dev],
    launchpad[2.6b1], loom[2.3.0dev], netrc_credential_store[2.6b1],
    news_merge[2.6b1], pipeline[1.4.0], qbzr[0.23.0dev], rewrite[0.6.4dev],
    svn[1.2.2dev], upload[1.2.0dev], xmloutput[0.8.8]
encoding: 'cp1252', fsenc: 'mbcs', lang: None

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Ajit (alessandro-domanico) wrote :
Caleb Sutton (cjamessutton) wrote :

I'm experience an identical issue on my Windows platform.

-----------------------------------------------------------

bzr: ERROR: httplib.IncompleteRead: IncompleteRead(34 bytes read)

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 920, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1131, in run_bzr
  File "bzrlib\commands.pyo", line 673, in run_argv_aliases
  File "bzrlib\commands.pyo", line 695, in run
  File "bzrlib\cleanup.pyo", line 136, in run_simple
  File "bzrlib\cleanup.pyo", line 166, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1438, in run
  File "bzrlib\controldir.pyo", line 779, in open_tree_or_branch
  File "bzrlib\controldir.pyo", line 459, in _get_tree_branch
  File "bzrlib\bzrdir.pyo", line 1082, in open_branch
  File "bzrlib\branch.pyo", line 2375, in open
  File "bzrlib\controldir.pyo", line 687, in open
  File "bzrlib\controldir.pyo", line 716, in open_from_transport
  File "bzrlib\transport\__init__.pyo", line 1718, in do_catching_redirections
  File "bzrlib\controldir.pyo", line 704, in find_format
  File "bzrlib\controldir.pyo", line 1149, in find_format
  File "C:/Program Files (x86)/Bazaar/plugins\git\__init__.py", line 235, in probe_transport
  File "C:/Program Files (x86)/Bazaar/plugins\git\__init__.py", line 182, in probe_http_transport
  File "socket.pyo", line 348, in read
  File "httplib.pyo", line 522, in read
  File "httplib.pyo", line 565, in _read_chunked
IncompleteRead: IncompleteRead(34 bytes read)

bzr 2.5.1 on python 2.6.6 (Windows-post2008Server-6.2.9200)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'branch', '--use-
    existing-dir', 'https://launchpad.net/~niemeyer/gocheck/trunk', '.']
plugins: bzrtools[2.5.0], changelog_merge[2.5.1], colo[0.4.0],
    explorer[1.2.2], fastimport[0.14.0dev], git[0.6.8], launchpad[2.5.1],
    loom[2.3.0dev], netrc_credential_store[2.5.1], news_merge[2.5.1],
    pipeline[1.4.0], qbzr[0.22.3], rewrite[0.6.4dev], svn[1.2.2],
    upload[1.2.0dev], xmloutput[0.8.8]
encoding: 'cp1252', fsenc: 'mbcs', lang: None

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

-----------------------------------------------------------

Bazaar (bzr) 2.5.1
  Python interpreter: C:\Program Files (x86)\Bazaar\python26.dll 2.6.6
  Python standard library: C:\Program Files (x86)\Bazaar\lib\library.zip
  Platform: Windows-post2008Server-6.2.9200
  bzrlib: C:\Program Files (x86)\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:/Users/CXS8YRM/AppData/Roaming/bazaar/2.0
  Bazaar log file: C:\Users\CXS8YRM\OneDrive - The Home Depot\Documents\.bzr.log

-----------------------------------------------------------

[System.Environment]::OSVersion.Version

Major Minor Build Revision
----- ----- ----- --------
10 0 17134 0

sdaau (sd-imi) wrote :

Same thing happens with:

bzr branch https://code.launchpad.net/~indicator-applet-developers/libappindicator/trunk.16.10
bzr branch lp:libappindicator

Here is a discussion:

* https://stackoverflow.com/questions/14149100/incompleteread-using-httplib

If I add the monkeypatch code suggested there, in /usr/lib/python2.7/dist-packages/bzrlib/transport/http/response.py

```
...
import httplib

def patch_http_response_read(func):
    def inner(*args):
        try:
            return func(*args)
        except httplib.IncompleteRead, e:
            return e.partial

    return inner

httplib.HTTPResponse.read = patch_http_response_read(httplib.HTTPResponse.read)

from cStringIO import StringIO
...
```

... then a different error occurs:

```
$ bzr branch lp:libappindicator
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: The remote server unexpectedly closed the connection.
```

If instead I apply the other suggestion:

```
...
import httplib

httplib.HTTPConnection._http_vsn = 10
httplib.HTTPConnection._http_vsn_str = 'HTTP/1.0'

from cStringIO import StringIO
...
```

... same thing:

```
$ bzr branch lp:libappindicator
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: The remote server unexpectedly closed the connection.
```

Given that `bzr` is sponsored by Canonical, and this is a failure where `bzr` fails to connect to Launchpad, which is also sponsored by Canonical, I guess it's worth asking: is the `bzr` project still alive, or should it be considered abandonware?

GeoDot (hertzg) wrote :

After adding an ssh key to launchpad.com and doing launchpad-login, the branch command worked.

1. Add your ssh key to launchpad.com (~/.ssh/id_rsa.pub)
2. $ bzr launchpad-login your-fancy-username-here
3. $ bzr branch lp:whatever-you-where-trying-to-branch

Seems like after you do a login, the branch command uses ssh instead of http(s) and that did the trick.

Ajit (alessandro-domanico) wrote :

Gosh!! GeoDot I was almost giving up but your message encouraged me to try again.

The SSH Key... I did have already set the SSH since many years but I forgot to use PageAnt (I'm on Windows machine). Actually I tried to set up again the SSH key on my profile but it was failing with the message "Invalid public key" and this was frustrating... but with PageAnt it works again.

For other people, follow these instructions: https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
For Windows users pay attention to STEP 5!!! Because that bug is still there (crazy but that's it).

Thanks!

Changed in bzr:
status: New → Invalid
assignee: nobody → Ajit (alessandro-domanico)
assignee: Ajit (alessandro-domanico) → nobody
status: Invalid → In Progress
status: In Progress → Invalid
Changed in bzr:
status: Invalid → New
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments