<div><p>Sporadically I receive an <code>ERR_INVALID_HTTP_RESPONSE</code> error which prevents me from receiving data from a user's file. I've noticed this occurs mainly when I've just authenticated. I refresh a few times and the error goes away.</p>
<pre><code>
OPTIONS {<!-- -->{v1/stores route}} net::ERR_INVALID_HTTP_RESPONSE
</code></pre>
<p>This video demonstrates the bug:
https://www.useloom.com/share/82c4799238f44e20a22463c8debde694</p>
<p>Here is my <code>api_endpoint.log</code>:
https://gist.github.com/cwackerfuss/dfc0bfcee0521a43067c325664bc8f77</p>
<p>I spoke with and he suggested this may be network trouble based on the following code:</p>
<pre><code>
127.0.0.1 - - [25/Nov/2017 23:31:34] "GET /v1/node/ping HTTP/1.1" 200 -
127.0.0.1 - - [25/Nov/2017 23:31:34] "GET /v1/wallet/payment_address HTTP/1.1" 200 -
[2017-11-25 23:31:35,295] [DEBUG] [common:671] (38825) Fetched 1050 bytes
[2017-11-25 23:31:35,297] [DEBUG] [common:657] (38825) Fetch index page https://www.dropbox.com/s/ccoh5anp92wska5/e?dl=1 via HTTP
[2017-11-25 23:31:36,524] [DEBUG] [common:671] (38825) Fetched 182 bytes
[2017-11-25 23:31:36,525] [ERROR] [common:981] (38825) No data URL from index for '/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore'
[2017-11-25 23:31:36,525] [ERROR] [common:1048] (38825) Failed to load data for /0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from hologram.id when forcing cache misses
[2017-11-25 23:31:36,525] [ERROR] [common:1059] (38825) Failed to load data for /0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from hologram.id
[2017-11-25 23:31:36,526] [DEBUG] [storage:932] (38918.123145497374720) No data from dropbox (https://www.dropbox.com/blockstack/0%253A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore)
[2017-11-25 23:31:36,531] [ERROR] [data:937] (38918.123145497374720) Failed to get mutable datum 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from dropbox
[2017-11-25 23:31:36,535] [DEBUG] [data:931] (38918.123145497374720) get_mutable_data(0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore) from s3
[2017-11-25 23:31:36,540] [DEBUG] [storage:873] (38918.123145497374720) get_mutable_data 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore fqu=hologram.id bsk_version=2
[2017-11-25 23:31:36,544] [DEBUG] [storage:891] (38918.123145497374720) 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore available at https://blockstack-server-profiles.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore
[2017-11-25 23:31:36,549] [DEBUG] [storage:917] (38918.123145497374720) Try s3 (https://blockstack-server-profiles.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore)
[2017-11-25 23:31:36,553] [DEBUG] [s3:88] (38825) Anonymous read-only connect to S3
[2017-11-25 23:31:37,560] [ERROR] [s3:92] (38825) Connection to S3 failed
[2017-11-25 23:31:37,560] [ERROR] [s3:93] (38825) No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
Traceback (most recent call last):
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/backend/drivers/s3.py", line 90, in get_bucket
conn = boto.connect_s3()
File "/tmp/blockstack-venv/lib/python2.7/site-packages/boto/__init__.py", line 141, in connect_s3
return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
File "/tmp/blockstack-venv/lib/python2.7/site-packages/boto/s3/connection.py", line 194, in __init__
validate_certs=validate_certs, profile_name=profile_name)
File "/tmp/blockstack-venv/lib/python2.7/site-packages/boto/connection.py", line 569, in __init__
host, config, self.provider, self._required_auth_capability())
File "/tmp/blockstack-venv/lib/python2.7/site-packages/boto/auth.py", line 1021, in get_auth_handler
'Check your credentials' % (len(names), str(names)))
NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials
[2017-11-25 23:31:37,560] [ERROR] [s3:172] (38825) Failed to get bucket 'blockstack-server-profiles'
[2017-11-25 23:31:37,561] [DEBUG] [storage:932] (38918.123145497374720) No data from s3 (https://blockstack-server-profiles.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore)
[2017-11-25 23:31:37,568] [ERROR] [data:937] (38918.123145497374720) Failed to get mutable datum 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from s3
[2017-11-25 23:31:37,573] [DEBUG] [data:931] (38918.123145497374720) get_mutable_data(0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore) from blockstack_resolver
[2017-11-25 23:31:37,577] [DEBUG] [storage:873] (38918.123145497374720) get_mutable_data 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore fqu=hologram.id bsk_version=2
[2017-11-25 23:31:37,582] [DEBUG] [storage:891] (38918.123145497374720) 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore available at https://blockstack.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore
[2017-11-25 23:31:37,587] [DEBUG] [storage:917] (38918.123145497374720) Try blockstack_resolver (https://blockstack.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore)
[2017-11-25 23:31:37,858] [DEBUG] [blockstack_resolver:87] (38825) GET https://blockstack.s3.amazonaws.com/hologram.id status code 403
[2017-11-25 23:31:37,858] [DEBUG] [storage:932] (38918.123145497374720) No data from blockstack_resolver (https://blockstack.s3.amazonaws.com/0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore)
[2017-11-25 23:31:37,864] [ERROR] [data:937] (38918.123145497374720) Failed to get mutable datum 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from blockstack_resolver
[2017-11-25 23:31:37,869] [DEBUG] [data:931] (38918.123145497374720) get_mutable_data(0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore) from http
[2017-11-25 23:31:37,874] [DEBUG] [storage:873] (38918.123145497374720) get_mutable_data 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore fqu=hologram.id bsk_version=2
[2017-11-25 23:31:37,878] [DEBUG] [storage:891] (38918.123145497374720) 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore available at None
[2017-11-25 23:31:37,883] [DEBUG] [storage:897] (38918.123145497374720) Cannot use http to generate a URL for 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore
[2017-11-25 23:31:37,887] [ERROR] [data:937] (38918.123145497374720) Failed to get mutable datum 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from http
[2017-11-25 23:31:37,891] [DEBUG] [data:931] (38918.123145497374720) get_mutable_data(0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore) from dht
[2017-11-25 23:31:37,896] [DEBUG] [storage:873] (38918.123145497374720) get_mutable_data 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore fqu=hologram.id bsk_version=2
[2017-11-25 23:31:37,902] [DEBUG] [storage:891] (38918.123145497374720) 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore available at dht+udp://40ad6ff12b4e32b4615e78bb2f28e46931953600
[2017-11-25 23:31:37,907] [DEBUG] [storage:917] (38918.123145497374720) Try dht (dht+udp://40ad6ff12b4e32b4615e78bb2f28e46931953600)
[2017-11-25 23:31:38,006] [DEBUG] [storage:932] (38918.123145497374720) No data from dht (dht+udp://40ad6ff12b4e32b4615e78bb2f28e46931953600)
[2017-11-25 23:31:38,013] [ERROR] [data:937] (38918.123145497374720) Failed to get mutable datum 0%3A1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka.datastore from dht
[2017-11-25 23:31:38,026] [DEBUG] [data:235] (38918.123145497374720) Cache datastore 1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka
127.0.0.1 - - [25/Nov/2017 23:31:38] "GET /v1/stores/1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka?device_ids=0&blockchain_id=hologram.id HTTP/1.1" 200 -
[2017-11-25 23:31:38,031] [ERROR] [rpc:4005] (38918.123145497374720) [Errno 41] Protocol wrong type for socket
Traceback (most recent call last):
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 4002, in _dispatch
return route_method( session, path_info, *route_args )
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 1318, in GET_store
return self._reply_json(ret)
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 231, in _reply_json
self._send_headers(status_code=status_code)
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 219, in _send_headers
self.send_header('content-type', content_type)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 401, in send_header
self.wfile.write("%s: %s\r\n" % (keyword, value))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 328, in write
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 41] Protocol wrong type for socket
127.0.0.1 - - [25/Nov/2017 23:31:38] "GET /v1/stores/1PtxJPxdzkeJ3hmTqKZo2ejiZbNbL5Loka?device_ids=0&blockchain_id=hologram.id HTTP/1.1" 500 -
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 599, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 657, in __init__
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 716, in finish
self.wfile.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
[2017-11-25 23:31:57,509] [DEBUG] [rpc:3923] (38918.123145522614272)
full path: /v1/wallet/payment_address
method: OPTIONS
path: /v1/wallet/payment_address
qs: {}
headers:
origin: http://localhost:8888
accept-language: en-US,en;q=0.9
accept-encoding: gzip, deflate, br
access-control-request-headers: authorization,content-type
connection: keep-alive
accept: */*
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
access-control-request-method: GET
host: localhost:6270
referer: http://localhost:8888/auth?authRequest=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJqdGkiOiIyOTMyOTliMy0zZGZkLTRmNjktOWJiMy02ODgxMTc5NDI0YjgiLCJpYXQiOjE1MTE2NzQzMTYsImV4cCI6MTUxMTY3NzkxNiwiaXNzIjoiZGlkOmJ0Yy1hZGRyOjFDR2dUaFMzb1EyYW03VFBSWThTVm1FaVRXUnpNVkZWSmYiLCJwdWJsaWNfa2V5cyI6WyIwMzQxM2Y5M2M0OTZkNjg3MmNkZWNlZDAzMmExMzkyNmJlNDgzMDMwZGZjMTM4YTA0OTY0MmNhZGExODIwZDUzZTkiXSwiZG9tYWluX25hbWUiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJtYW5pZmVzdF91cmkiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAvbWFuaWZlc3QuanNvbiIsInJlZGlyZWN0X3VyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMC8iLCJzY29wZXMiOlsic3RvcmVfd3JpdGUiXX0.EghFuYF4NZpIHRW2RWCjjL8f8w34zA_3aGx1UedjDbQU5c_CAp94iBbCcsz6sxq-plrLGJfXZRyAOxmJ6idxYQ
[2017-11-25 23:31:57,510] [DEBUG] [rpc:3923] (38918.123145526820864)
full path: /v1/node/ping
method: GET
path: /v1/node/ping
qs: {}
headers:
origin: http://localhost:8888
accept-language: en-US,en;q=0.9
accept-encoding: gzip, deflate, br
connection: keep-alive
accept: */*
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
host: localhost:6270
referer: http://localhost:8888/auth?authRequest=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJqdGkiOiIyOTMyOTliMy0zZGZkLTRmNjktOWJiMy02ODgxMTc5NDI0YjgiLCJpYXQiOjE1MTE2NzQzMTYsImV4cCI6MTUxMTY3NzkxNiwiaXNzIjoiZGlkOmJ0Yy1hZGRyOjFDR2dUaFMzb1EyYW03VFBSWThTVm1FaVRXUnpNVkZWSmYiLCJwdWJsaWNfa2V5cyI6WyIwMzQxM2Y5M2M0OTZkNjg3MmNkZWNlZDAzMmExMzkyNmJlNDgzMDMwZGZjMTM4YTA0OTY0MmNhZGExODIwZDUzZTkiXSwiZG9tYWluX25hbWUiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJtYW5pZmVzdF91cmkiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAvbWFuaWZlc3QuanNvbiIsInJlZGlyZWN0X3VyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMC8iLCJzY29wZXMiOlsic3RvcmVfd3JpdGUiXX0.EghFuYF4NZpIHRW2RWCjjL8f8w34zA_3aGx1UedjDbQU5c_CAp94iBbCcsz6sxq-plrLGJfXZRyAOxmJ6idxYQ
[2017-11-25 23:31:57,517] [DEBUG] [rpc:390] (38918.123145522614272) No authorization header
[2017-11-25 23:31:57,522] [DEBUG] [rpc:390] (38918.123145526820864) No authorization header
[2017-11-25 23:31:57,527] [DEBUG] [rpc:3965] (38918.123145522614272) No authentication needed
[2017-11-25 23:31:57,532] [DEBUG] [rpc:3965] (38918.123145526820864) No authentication needed
127.0.0.1 - - [25/Nov/2017 23:31:57] "OPTIONS /v1/wallet/payment_address HTTP/1.1" 200 -
127.0.0.1 - - [25/Nov/2017 23:31:57] "GET /v1/node/ping HTTP/1.1" 200 -
[2017-11-25 23:31:57,542] [ERROR] [rpc:4005] (38918.123145526820864) [Errno 32] Broken pipe
Traceback (most recent call last):
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 4002, in _dispatch
return route_method( session, path_info, *route_args )
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 2981, in GET_ping
self._reply_json({'status': 'alive', 'version': SERIES_VERSION})
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 231, in _reply_json
self._send_headers(status_code=status_code)
File "/tmp/blockstack-venv/lib/python2.7/site-packages/blockstack_client/rpc.py", line 218, in _send_headers
self.send_response(status_code)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 393, in send_response
(self.protocol_version, code, message))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 328, in write
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
127.0.0.1 - - [25/Nov/2017 23:31:57] "GET /v1/node/ping HTTP/1.1" 500 -
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 599, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 657, in __init__
self.finish()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 716, in finish
self.wfile.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
[2017-11-25 23:31:57,653] [DEBUG] [rpc:3923] (38918.123145522614272)
full path: /v1/wallet/payment_address
</code></pre>
<p>Any help would be appreciated!</p><p>该提问来源于开源项目:blockstack/stacks-blockchain</p></div>