matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
153 stars 139 forks source link

Tests failing with Twisted 23.10 #356

Closed DMRobertson closed 1 month ago

DMRobertson commented 7 months ago
dmr on titan in sygnal on ξ‚  dmr/fix-version via 🐍 v3.11.6 (python-3.11.6) 
2023-11-21 15:55:11 βœ”  $ python -m twisted.trial tests.test_httpproxy_twisted 
tests.test_httpproxy_twisted
  SygnalTwistedProxyTests
    test_https_request_via_proxy ... 2023-11-21 15:55:16,808 [541273] DEBUG sygnal.sygnal Started logging
2023-11-21 15:55:16,808 [541273] INFO  sygnal.sygnal Importing pushkin module: tests.test_gcm
2023-11-21 15:55:16,809 [541273] INFO  sygnal.sygnal Creating pushkin: TestGcmPushkin
2023-11-21 15:55:16,822 [541273] INFO  sygnal.sygnal Configured with app IDs: dict_keys(['com.example.gcm'])
2023-11-21 15:55:16,823 [541273] INFO  sygnal.sygnal Starting listening on 127.0.0.1 port 5000
2023-11-21 15:55:16,823 [541273] DEBUG sygnal.helper.proxy.proxyagent_twisted Requesting b'https://test.com/abc' via <HTTPConnectProxyEndpoint <HostnameEndpoint proxy.com:1080>>
2023-11-21 15:55:16,824 [541273] DEBUG sygnal.helper.proxy.connectproxyclient_twisted Connected to proxy, sending CONNECT
2023-11-21 15:55:16,824 [541273] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>-><twisted.web.http.HTTPChannel object at 0x7f9c0d1b0a90>: b'CONNECT test.com:443 HTTP/1.0\r\n\r\n'
2023-11-21 15:55:16,824 [541273] INFO  tests.test_httpproxy_twisted Completed request <Request at 0x7f9c0ad410d0 method=CONNECT uri=test.com:443 clientproto=HTTP/1.0>
Certificate request self-signature ok
subject=
2023-11-21 15:55:16,858 [541273] INFO  tests.twisted_test_helpers <twisted.web.http.HTTPChannel object at 0x7f9c0d1b0a90>-><twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>: b'HTTP/1.0 200 OK\r\n\r\n'
2023-11-21 15:55:16,858 [541273] DEBUG sygnal.helper.proxy.connectproxyclient_twisted Got Status: b'200' b'OK' b'HTTP/1.0'
2023-11-21 15:55:16,858 [541273] DEBUG sygnal.helper.proxy.connectproxyclient_twisted End Headers
2023-11-21 15:55:16,858 [541273] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>-><twisted.protocols.tls.BufferingTLSTransport object at 0x7f9c0c198490>: b"\x16\x03\x01\x01E\x01\x00\x01A\x03\x03\x8e\x9d\xc0/\xffL\x85\xe5\xa8hn\x93\xf45X\x97b\xe3\xb3\x02\x84\x98\x13V\x16#V5F\xf6\x05\xc7 \x93\x1d\xe7\xa6\x12=a\xf3_\xc4(\xf0\x84=\x99\xf9\xe6v\xb7\x17\xcf\xbd\xb3\xe4h[_G\xfb\xff\x1a\xc5\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/\xcc\xa9\xcc\xa8\x00\x9f\x00\x9e\xcc\xaa\xc0\xaf\xc0\xad\xc0$\xc0(\xc0\n\xc0\x14\xc0\xa3\xc0\x9f\x00k\x009\xc0\xae\xc0\xac\xc0#\xc0'\xc0\t\xc0\x13\xc0\xa2\xc0\x9e\x00g\x003\x00\x9d\x00\x9c\xc0\xa1\xc0\x9d\xc0\xa0\xc0\x9c\x00=\x00<\x005\x00/\x00\xff\x01\x00\x00\xa2\x00\x00\x00\r\x00\x0b\x00\x00\x08test.com\x00\x0b\x00\x04\x03\x00\x01\x02\x00\n\x00\x16\x00\x14\x00\x1d\x00\x17\x00\x1e\x00\x19\x00\x18\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x00\x16\x00\x00\x00\x17\x00\x00\x00\r\x00*\x00(\x04\x03\x05\x03\x06\x03\x08\x07\x08\x08\x08\t\x08\n\x08\x0b\x08\x04\x08\x05\x08\x06\x04\x01\x05\x01\x06\x01\x03\x03\x03\x01\x03\x02\x04\x02\x05\x02\x06\x02\x00+\x00\x05\x04\x03\x04\x03\x03\x00-\x00\x02\x01\x01\x003\x00&\x00$\x00\x1d\x00 ^\x1c{\xe6\x0b\xdf\xf2C\xe0\xee\x81\\\xe3^\xd7xt\xf6\\\xb2\xc65XX\x83\xcf\xcfD\xcd\xab\x1c,"
2023-11-21 15:55:16,860 [541273] INFO  tests.twisted_test_helpers <twisted.protocols.tls.BufferingTLSTransport object at 0x7f9c0c198490>-><twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>: b'\x16\x03\x03\x00z\x02\x00\x00v\x03\x03TZ\x84\xdbM\xe3\xd1S\x84d-\x18Vr4\xc7\xc3\xbf\xe3I\xf39\xcf!n\xea\x7f\xf0M\x8d\x912 \x93\x1d\xe7\xa6\x12=a\xf3_\xc4(\xf0\x84=\x99\xf9\xe6v\xb7\x17\xcf\xbd\xb3\xe4h[_G\xfb\xff\x1a\xc5\x13\x02\x00\x00.\x00+\x00\x02\x03\x04\x003\x00$\x00\x1d\x00 \xc7\x05\xb6\xfc\x1c\xf1\x08\xea>y\xee\xa0\x97\xcaO\xd9[\xb2X\xe0\xec\x87\x9bv\xd5\xaf:)\x89\xd1NA\x14\x03\x03\x00\x01\x01\x17\x03\x03\x00\x17\x96\xc0<\x92/I\xfd\xe4\x9by\xc4\xa6\xa2\xa3\xb9dq\xcdt9\x9d\xa8\xdd\x17\x03\x03\x03&\xd3X\x8b\xdb\xb9\x9eu\xe9KO\xfb\xc9\x9f\tL\xcf\x169\x11\x87\x0c(\x05*\nC5\x9e\xc3w\x83\x11\xb8\xff\xd6\xf5s"\xb6"\xad\x9d\xa5\xfc\x93\x16#\xeeL!\x1c\xf37#\xfb\xba\x16\xdb`\xad\xf3\x04<\xa8\xb3\xae\xb9G\x118\xb8\xdf\xabx\xbf.\xa1\x0b3\xca\xe3\x02\xba\x96\x80\xc4\xe5\x95(\xe2\x1e\xc3\xe9\xe0\xb8\x1b\x93\xba\xa4\x15\t\x95B"\xa4\\\x16k\x0f\x8a\x97K\xfa\x83\x03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\x13I\x072\x85!\x93\x9c%\xdc\xc8\xcd\xe1\x93\t\xf7#\x1a\x04=f\x89\xdcd\xa5It\xd0\x06.\xd84\xfd\x99\xcc\xef&\x8a\x88\x12\x80.\xa2\xa3\xf0W;\x14\xbf\xd7\\\xad\xa4\x05?B\x82\xcf\x18\xc8=1\x17\x11\x85R\xe5\\\xd89\xe0O8A\x8f\xc1,c\xe6]^$\xd3\xee\x7f/4\xe1\xd6?\xc4\xd1\xd2P\x90\x02\xe4|\xf2\xe5\x8fY\r\x98\xca\r\xc2\xa0lj\xfd\xef\xaf\xf8\x11\xe8\x9e\xd6\xbc\xf0*\xa1%\xc0hu!\x981\xe5Ka\xce\x8a\x91\xf9\t\x8c\xfd\x80\x97\xec\x91\x16\xd8<m\x1dY\x94\xc4\xc6\xaa\x16\x99\xf4\xf3\xd3q?*\x03\\\x11\x8e3\xd2fm\xb9\xd8\xb7N\xd3\x9a\x00\xc5%\'\xf8\\\x0b\x8e\x9f\x04(\xb6\x19B\xc9\xc66\xe6\xce\xdf\\\xa2\x0b\x17q\t\x8a\xdd\x17\x03\x03\x00E\xfd\x94P\x97\xacs\xc2\x1cm\xc2\x8a(\xe8\xaa\xe7\x832q<:\x0e\x17\xd3?\xd4\xc6\xb2!\x1b\x8e\xe1P\x1e\xfd#\x03\'\x80\xce\xd6 \xe9?\xd1K\x81\xd4\x9f\xd9\x88#]\xf13\x14\x91\xe0\x81\xc19\x18t\x0f\x93\xd0<c\x1d\x97'
2023-11-21 15:55:16,860 [541273] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>-><twisted.protocols.tls.BufferingTLSTransport object at 0x7f9c0c198490>: b'\x14\x03\x03\x00\x01\x01\x17\x03\x03\x00Ep\xf0\xd2\x1c\xcc\xeapb\xe7\x91\'\x85i\x1d^\x86\x00\x13\xddD\x99\xe49\xed\xa9\x04\xf0\x0f\xea4\xe1"p\xfd\xde\x85r\xab\xfb\x81>\xf9\xddxaF\x82\xb7\xba\x8aa\x17\xd1\x8bp^\xc1\xe3\x1ex?\x04}\xaf\xf95x\x8a\x14'
2023-11-21 15:55:16,861 [541273] INFO  tests.twisted_test_helpers <twisted.protocols.tls.BufferingTLSTransport object at 0x7f9c0c198490>-><twisted.internet.endpoints._WrappingProtocol object at 0x7f9c0a838a50>: b"\x17\x03\x03\x00\xfa\xe8C\xfb\x19\xf6h\x1dD\x8b\x13\x12O\xcc\xfc#\xd9C\x8e\x7f\x979vgU\x9b\xfe\x04TI\xeb\xba\xbe ~C\\\rG\x8en\x8e\x16\x06\x12\xa3M\xe3\\\x12\xd4*\xf1\xc0u\xdak\xa5\x9e\x9b\xec\x0e\xf8\x927\x0cS3\xb0\x08_\xcc\x81-}\x84\xcbs\xd2D\xd6E`\xd0f\xdd\xd0\x8f\x98\xa87\xeb\xf9\x87\xf2\x174y\xc0a\\U\xc9\xad\x14xq\xbe[%/\xe3 R\xd0G\x88\xed\x981\xd3\xf7\xd2\x95$n-0\xf7\xa6\xed\x9a\xdbnm\xf1\x16~\x07\xb3cT\x9a\xfe3\xbaG5\x07Ge\xa2z{\xa3\x172\x88\x7fR\xb4\xd0\xeaC\x96\x80+\x801\x14u,\xc5\\\x18\x93\x06P\xfe\xf7\xe9\x9f\xfa\xcfd\x83<\x9c\x91\xf5\x9fq\x14({\xe9\xa4%N\xfdR\xb8\xf0\x80~]\x04\xd0\xbbz\x13\xff=\xed\xb3\x0e\xd5|\x13-\xa16M\xfc\x05B\x01\xff\xfaR\x1d#h\xbe\x9c,\x0e-jF\x00\xbc\xf6=\xfe2~=\x9a:\xca\x17\x03\x03\x00\xfa\x0c7\xa1\x1c3j\x17\xbf\x953u\xb3\x98\xeb\xf5\x13N\n\x17`\xf7Fh\xba\xeb^RdqS\x9c\xd2\xd8c\xddO\xf2\xee\x99\xf5u8\x80&\x8d\xd0U\xe6p]f\x83\x19U'\x1f\xabC\x7f\xe9u\xe0\xd6,\xd5\xe0\x1dfH\xf7\xea\xe4i\xf5weLS\x01\xb2\x87\x18\x083\x1b`\xd0YQ\xb3_gE\xb1\x07x)\xad\x99\xa0 \x04\xd3\xa1\xd8\xcb\x97v\xb3\xcb\\\x8fT\x9f\xef\xc5\x7f\xb6\xdc\xcfTo\x84\xd3F[\xd9Ce\xc2G\xe5^t(\x0b\x96\xed\xa3\x13\xe7b\xa5\x93A\xed\xc8P\xca\x05\xd0+\tv\xa4\x14y\xadE\xeb\xe7{6\xcf6#\xa8\x9a\xea\x14jR\x06\xc0\xe9\xd2Q{\t&@\xdb\xd6@\x90~}o\x18m\xa0V\\o\x9d\t\xe2+B\xd9\xc8g\xaf\xa7ZX\x01\xb6\x85\xb4\xa2\x17\xf4Wi\xb5\xc13Y\xd6\xb3\xcf\xfea\xd3i\xbfK\x0509*\xaf\xa5\xd7\x98\x88\x19\x0c\xb1)\x06\x17N\xb1\xa3\x7f\xbaT\x03"
                                    [FAIL]

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/tests/test_httpproxy_twisted.py", line 172, in test_https_request_via_proxy
    self.assertEqual(len(http_server.requests), 1)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/trial/_synctest.py", line 444, in assertEqual
    super().assertEqual(first, second, msg)
  File "/usr/lib64/python3.11/unittest/case.py", line 873, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python3.11/unittest/case.py", line 866, in _baseAssertEqual
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: 0 != 1

tests.test_httpproxy_twisted.SygnalTwistedProxyTests.test_https_request_via_proxy
-------------------------------------------------------------------------------
Ran 1 tests in 0.057s

FAILED (failures=1)

If I downgrade to the previous twisted, this passes:

2023-11-21 15:55:47 βœ”  $ python -m twisted.trial tests.test_httpproxy_twisted 
tests.test_httpproxy_twisted
  SygnalTwistedProxyTests
    test_https_request_via_proxy ... 2023-11-21 15:55:50,444 [541380] DEBUG sygnal.sygnal Started logging
2023-11-21 15:55:50,444 [541380] INFO  sygnal.sygnal Importing pushkin module: tests.test_gcm
2023-11-21 15:55:50,446 [541380] INFO  sygnal.sygnal Creating pushkin: TestGcmPushkin
2023-11-21 15:55:50,459 [541380] INFO  sygnal.sygnal Configured with app IDs: dict_keys(['com.example.gcm'])
2023-11-21 15:55:50,459 [541380] INFO  sygnal.sygnal Starting listening on 127.0.0.1 port 5000
2023-11-21 15:55:50,460 [541380] DEBUG sygnal.helper.proxy.proxyagent_twisted Requesting b'https://test.com/abc' via <HTTPConnectProxyEndpoint <HostnameEndpoint proxy.com:1080>>
2023-11-21 15:55:50,460 [541380] DEBUG sygnal.helper.proxy.connectproxyclient_twisted Connected to proxy, sending CONNECT
2023-11-21 15:55:50,461 [541380] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>-><twisted.web.http.HTTPChannel object at 0x7facb139b410>: b'CONNECT test.com:443 HTTP/1.0\r\n\r\n'
2023-11-21 15:55:50,461 [541380] INFO  tests.test_httpproxy_twisted Completed request <Request at 0x7facb11e6050 method=CONNECT uri=test.com:443 clientproto=HTTP/1.0>
Certificate request self-signature ok
subject=
2023-11-21 15:55:50,495 [541380] INFO  tests.twisted_test_helpers <twisted.web.http.HTTPChannel object at 0x7facb139b410>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>: b'HTTP/1.0 200 OK\r\n\r\n'
2023-11-21 15:55:50,495 [541380] DEBUG sygnal.helper.proxy.connectproxyclient_twisted Got Status: b'200' b'OK' b'HTTP/1.0'
2023-11-21 15:55:50,495 [541380] DEBUG sygnal.helper.proxy.connectproxyclient_twisted End Headers
2023-11-21 15:55:50,495 [541380] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>-><twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>: b"\x16\x03\x01\x01E\x01\x00\x01A\x03\x03\x13\x1d\n\x10y\x87\x1c\x13n\xaa\xbbF3\xd1\x1eQ~\xbb\x99\xc1\x94eVU\x9d\x07\xc9\xa6\xe7\xe3\xc4\x9f ~\xbb\x93\x85qf\xbe\xedD\xe3\xe4X\x9a\xceV\x83k]\x1cc\xf8/}QS\x174\x9d\x1f\x0b9\x0f\x00V\x13\x02\x13\x03\x13\x01\xc0,\xc00\xc0+\xc0/\xcc\xa9\xcc\xa8\x00\x9f\x00\x9e\xcc\xaa\xc0\xaf\xc0\xad\xc0$\xc0(\xc0\n\xc0\x14\xc0\xa3\xc0\x9f\x00k\x009\xc0\xae\xc0\xac\xc0#\xc0'\xc0\t\xc0\x13\xc0\xa2\xc0\x9e\x00g\x003\x00\x9d\x00\x9c\xc0\xa1\xc0\x9d\xc0\xa0\xc0\x9c\x00=\x00<\x005\x00/\x00\xff\x01\x00\x00\xa2\x00\x00\x00\r\x00\x0b\x00\x00\x08test.com\x00\x0b\x00\x04\x03\x00\x01\x02\x00\n\x00\x16\x00\x14\x00\x1d\x00\x17\x00\x1e\x00\x19\x00\x18\x01\x00\x01\x01\x01\x02\x01\x03\x01\x04\x00\x16\x00\x00\x00\x17\x00\x00\x00\r\x00*\x00(\x04\x03\x05\x03\x06\x03\x08\x07\x08\x08\x08\t\x08\n\x08\x0b\x08\x04\x08\x05\x08\x06\x04\x01\x05\x01\x06\x01\x03\x03\x03\x01\x03\x02\x04\x02\x05\x02\x06\x02\x00+\x00\x05\x04\x03\x04\x03\x03\x00-\x00\x02\x01\x01\x003\x00&\x00$\x00\x1d\x00 \xc1&\xe1\xe7\x93\x08f\xf1,\xc2\x1b\xc1\x9dO;\xfb\xe0|\xe3nco)\x00X\xa6.\xde\xcf`/y"
2023-11-21 15:55:50,496 [541380] INFO  tests.twisted_test_helpers <twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>: b'\x16\x03\x03\x00z\x02\x00\x00v\x03\x03d\xea\x8f\xa64(\xda%\xeeLT\xdc\xe9\xf0\x99\xef\xd9\xf3\xec\xff\xc1\xfb\x96\xb7\xa8v\x9b\x88\x9d\xc1I> ~\xbb\x93\x85qf\xbe\xedD\xe3\xe4X\x9a\xceV\x83k]\x1cc\xf8/}QS\x174\x9d\x1f\x0b9\x0f\x13\x02\x00\x00.\x00+\x00\x02\x03\x04\x003\x00$\x00\x1d\x00 :%4\xeb\x86y\x7f\xfaj"ob\\\x82\x84%\x86P\xb61`\xf0|Qz$\xc61\x82\xc4i6\x14\x03\x03\x00\x01\x01\x17\x03\x03\x00\x17\xfaSj\x13\x11)\xd4*{\xa7\xf3\x1cxx\x82+x\xdb\x1c\xaf\x00\xba|\x17\x03\x03\x03&x\xdb\xea&\x06 \xc7\x19\x8b\x08A\xfe\xb2z\x1b\xa6\x1f\x97\xb6\xd0\xd7\xe1>i\xb5i>&\xd9\xb5O\t\x98\xe8\xdcd\x13te\xc3\xec\xfe\xea\xc0\xa5\x01F\xe0\xff\xe7~\xfe\x0b\x84\xbf2x\xa8\xa1\x98\xc3D\xc0\xefA_\x85\xd1\xee:\xde\xcd\xd1^\xc3K.#8\xc3BY~\x12\xb2\xcdm\xe1m\xcb\xbd\xbaM\xa8\xb1oC\xf9\x1c\xef\xb4$u\xad\xda\xf5\xa3\xf6\x00\xef\xf5\xcd\x81\xd7$\x1c&V\xdd7e.\x8f\xdczc\xee\xc2i\x91\xf6\xadr\x9cg\xf9%\xb1\xe7}A\xabf\x02.\xb9\x9c\x07x\x986}\x9a\x0b\x03\xd7t\xae\xb7\x9b:\x04( \xa0\xb6\x9e\xd4,z\xb1\xdd\xc8\xa5\xac_\xb2\xbf\x13D\xdf\xe0\xa64\xfd\x17\x9d\xbfU\\\xc79e\xe3r\xf5\x90h\'`_<31\x7f\xe0\xda\xb94\x04o\x9a\xe0\x81LF\x93P\xda\x89\x19\x91lAU\xde\xcc\xb6\xc4\'j\xdb\xf5R\xa62\xd9d#\xfbs=\xc5\xf0\xd3\xf0)\x1e\x90\xc0\x0c\x8bm\nf\x162\x8d\xb7oBN\x01\x84\xa4\x9ez#\x91\xcc\xba\x19d\xc0\x9f0\xed9\xb9>\xa3\xab2\x8f\x19\xda\xaa\xd0\x8a\x81~!\xc8\xbe\xdc\x85\x1fj2\xa0\xca\xf9\x9a\xa0\xce\xe0Ok\x92\x14\xc0C\xd8MX\xf8Ls\x15W\x18\xa4/\x12\xd4{\x1b.\x05x\xfb\xab\xaf\xba\x98|\x90\x16\x10E\xae\x08h\xa4\t\xcf\x97\x8e\xf2\x86\xed\xfe\xd5$\x9a\x1ci\x05\x07Qx\x83\x947g\xe6\xc7\x12\x00,\x85\xaa\x1c\x83\x89\x84\xfc#%v\xdf\xdb\xc7Fj1ZIp:\xf4/:\'\r\xb5\x83C<.\xbbE\x9d\xdf\xb6\x87[\xe1\x8f\xc8@\x040\xfe\xaeA\xfc\xca\xd8\x98s\xe2U\x94c\xa2\x0c\xb4\x85\x99q\xdeqk^\x84\xcaH\xb1\x90\x8f\xa6\xfc\x9a\xce\xa6\xd1b\'c\x95\x84\xcc\t\xa2\xcc\x0e\xe7yZ\x84\xdck\xe4\x16\x11\xe0z\x0c\xfd\x9e\rn\x00L\xcf"\xddQW\'f\x97A\xf1\xfa\x17\x04:\xa2=\x81\xaej\x8b\xf7c\x11\xfe\xdd\x12\x82\xd4L\x85U{t\x0f\x91+\xac\x02,O\xa7\x07\xa8c\x90_\xf7d\xf2\xccs\x81\xbb\x7f\x0fp\xe2\xe0\xfea\xd4\x9cvfm\xe5\x8a\xf8\x93\x08a"\x03\x83\x08C\xc5D\xceFSu\xe7\n\xad\xbcA\x96w\xea\xc0\xf6\x0c\xbb,\x9e\xea\x85\x86GN\x9f\xbe\xe4\xce\xe0\x96\x97\xdb\x85\xb8\xbd\xf0\xc91\xcfa\xad\x862t"\xd9\x97\xc0\x84\xae\x98t\xc2Q;\x92\x88\xddp\xaf\xdf\t&\xd8\x86)\xb3\xa4\x1cc\xfdj\x95\x82\xdd\xe6\x1c\x1a\xbc:\x92Qx\x97\xce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x9c\xa4\xb3T7o\t\xdd\x15H\xdfOf\xea\xf2L\xe7p|\xed\x9d\xec\xe4~\xf7\xb2\xc7M\x142r|\xc6JyR\xfe2\xc5\xfb\x9a\xac0D\x11\x89\xcaf\x8d1I&\xd4\xdcV,y\x9djUh\x9bYN]\xb6\xa3\xec!\x17\x03\x03\x00E}\xa7Xw\xe6^\xb5$\xd6\xf3\x03\xf7\xb6\xb5?H\xb7\x1e\xd8\xbbS3\xee\xdb\x02\x9c\xc6\x11ci{\xc0\xf9j T\xfcD\xee\xf5\x03P\xbd\x0f\x80\x9b\x9aA\x89\xc35{Yp\xe0\x88\\Z\x99n\xc9o\xf6\x07}\xe8\xebz\xf3'
2023-11-21 15:55:50,497 [541380] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>-><twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>: b'\x14\x03\x03\x00\x01\x01\x17\x03\x03\x00E\xa1\x0e\xa5F\xd6\xb1\x0f\x0b\xfa\xca@\xf9vZ\x15L\x8b\xb1\xa5F\x1c)\xa9\xdc\xc7\x95\xb4\x82Nw\x1f\xda\xb6\xf4\xaf\xba\x99\x9b\xcc\x9ew\xa5z\x95\xbb\x0e\x85\xebD\xb2tB\xef\xbb_+\x03\x16\xd9\x1dA>\xe6eT04`\xa8\x17\x03\x03\x00I\xc9\xd5~\x1d\x7f\xca\xf1\xe7\x8c\xec\xf1 A\xcax\x91\xf9\xe92\x92]5\xb5\x9e\xbeG\xe0\xc8\x00\xe3\xe8l\x9e\x9c\xd2\xb1]\xe1\xc2\xa2\xa3\x98a\x11pxRr9N\x83"\xfa\xe6\xd9[\xa9{(f\x1a\xac\xf1!\x9f\xe7\x9e\xb5\xb0\xc2FH\x82'
2023-11-21 15:55:50,497 [541380] INFO  tests.twisted_test_helpers <twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11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R\x8c\x8cM\x9d\xaf\xa9\xc4c\xd7\xcfg\x0e\x08m_\x98\x01V\x9b\xf9F\x1f\x02\xdf9q@3\xb9c\xbf\xadj\xaaz!\xf7C\xc3=\xb9%\x83\xb9,\xb2\xfb\x84\xdf\xb0\'\xb4R\xa1\xc6\xe0\x8e4\xe0\xd8\x93\x17\xf4\x95O\xd0\xbf\x0f\xd6\xa2\xcf\xf00f\xb5\xb0,\x0c\x85\xa8\xd2\xe3\x05\x82H\xa0\xa8\x1a\xac\x97\xdc\xf8\x11\xc0\xc5\xd0E,\xa2W\xecU\xd3;\xa54\x076\xa8\xc7\x11\xf2\xf9\x93k\xbd\xce\xe8\x10\x1a\t\xe1Y\xc7\xa8\x95\xef'
2023-11-21 15:55:50,497 [541380] INFO  tests.twisted_test_helpers <twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>: b'\x17\x03\x03\x00S\xa9Z\xf2\x9bJ\x1cjN~;`}/\x83\xc6x\xec\x8b\xee:\x0c=RTF\x06\xe0N\x10\xd0\xf7 \xeb\xda\xd0\x1b\xba\xd4\xa8\xf3"\x17b\x92O\xc8t\xce\xd1cu\xdb\xe6\x92\xec\xb8\xef\x86\xb1\xf7|\xe10\xfc\xff\xbd\xe4\xf2\xe0?)k\xb2\xccG\x1c\xfc5\xf6\x18D\x1d\xba\x17\x03\x03\x00\x1c~}\xfd\x81\x08BK\x84kn\xc3\xec%\x1f+\x1d!T u\xd4\x9bHL\xa6\xc8/\xa6'
2023-11-21 15:55:50,498 [541380] INFO  tests.test_httpproxy_twisted Completed request <Request at 0x7facb11e7110 method=GET uri=/abc clientproto=HTTP/1.1>
2023-11-21 15:55:50,498 [541380] INFO  tests.twisted_test_helpers <twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>: b'\x17\x03\x03\x00\x16\x1dfu\xb5\r\xba\xf0\xc2D\x82_6\x8c\x1fwK\xad\x0fZ3_\x03\x17\x03\x03\x00\x13!$]T\x0e\xf3|\x8e\xb4\xc0\x1aO\xab\x82\xe7\xf7<\xff\\'
2023-11-21 15:55:50,498 [541380] INFO  tests.twisted_test_helpers FakeTransport: loseConnection(None)
2023-11-21 15:55:50,498 [541380] INFO  tests.twisted_test_helpers FakeTransport: Delaying disconnect until buffer is flushed
2023-11-21 15:55:50,498 [541380] ERROR tests.twisted_test_helpers Exception writing to protocol: 'NoneType' object has no attribute 'bio_read'
Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 274, in _flushReceiveBIO
    bytes = self._tlsConnection.recv(2 ** 15)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/OpenSSL/SSL.py", line 2076, in recv
    self._raise_ssl_error(self._ssl, result)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/OpenSSL/SSL.py", line 1814, in _raise_ssl_error
    raise ZeroReturnError()
OpenSSL.SSL.ZeroReturnError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/tests/twisted_test_helpers.py", line 155, in flush
    self.other.dataReceived(to_write)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/internet/endpoints.py", line 151, in dataReceived
    return self._wrappedProtocol.dataReceived(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/sygnal/helper/proxy/connectproxyclient_twisted.py", line 208, in dataReceived
    return self.wrapped_protocol.dataReceived(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 329, in dataReceived
    self._flushReceiveBIO()
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 285, in _flushReceiveBIO
    self._tlsShutdownFinished(None)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 375, in _tlsShutdownFinished
    self._flushSendBIO()
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 253, in _flushSendBIO
    bytes = self._tlsConnection.bio_read(2 ** 15)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'bio_read'
2023-11-21 15:55:50,500 [541380] INFO  tests.twisted_test_helpers <twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>-><twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>: b'\x17\x03\x03\x00\x16\x1dfu\xb5\r\xba\xf0\xc2D\x82_6\x8c\x1fwK\xad\x0fZ3_\x03\x17\x03\x03\x00\x13!$]T\x0e\xf3|\x8e\xb4\xc0\x1aO\xab\x82\xe7\xf7<\xff\\'
2023-11-21 15:55:50,500 [541380] ERROR tests.twisted_test_helpers Exception writing to protocol: 'NoneType' object has no attribute 'write'
Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/tests/twisted_test_helpers.py", line 155, in flush
    self.other.dataReceived(to_write)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/internet/endpoints.py", line 151, in dataReceived
    return self._wrappedProtocol.dataReceived(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/sygnal/helper/proxy/connectproxyclient_twisted.py", line 212, in dataReceived
    return self.http_setup_client.dataReceived(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/basic.py", line 555, in dataReceived
    why = self.rawDataReceived(data)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/web/http.py", line 733, in rawDataReceived
    self.handleResponsePart(data)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/web/http.py", line 702, in handleResponsePart
    self.__buffer.write(data)
    ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write'
2023-11-21 15:55:50,501 [541380] INFO  tests.twisted_test_helpers <twisted.internet.endpoints._WrappingProtocol object at 0x7facb11e6790>-><twisted.protocols.tls.TLSMemoryBIOProtocol object at 0x7facb11e5cd0>: b'\x17\x03\x03\x00\x13\x06kP\x0e\xa5Z9.\xf1T\xadplN\xaaf\xec0n'
2023-11-21 15:55:50,501 [541380] INFO  tests.twisted_test_helpers FakeTransport: loseConnection(None)
2023-11-21 15:55:50,501 [541380] INFO  tests.twisted_test_helpers FakeTransport: Delaying disconnect until buffer is flushed
2023-11-21 15:55:50,501 [541380] ERROR tests.twisted_test_helpers Exception writing to protocol: 'NoneType' object has no attribute 'bio_read'
Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 274, in _flushReceiveBIO
    bytes = self._tlsConnection.recv(2 ** 15)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/OpenSSL/SSL.py", line 2076, in recv
    self._raise_ssl_error(self._ssl, result)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/OpenSSL/SSL.py", line 1814, in _raise_ssl_error
    raise ZeroReturnError()
OpenSSL.SSL.ZeroReturnError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dmr/workspace/sygnal/tests/twisted_test_helpers.py", line 155, in flush
    self.other.dataReceived(to_write)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 329, in dataReceived
    self._flushReceiveBIO()
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 285, in _flushReceiveBIO
    self._tlsShutdownFinished(None)
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 375, in _tlsShutdownFinished
    self._flushSendBIO()
  File "/home/dmr/workspace/sygnal/.direnv/python-3.11.6/lib64/python3.11/site-packages/twisted/protocols/tls.py", line 253, in _flushSendBIO
    bytes = self._tlsConnection.bio_read(2 ** 15)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'bio_read'
                                      [OK]

-------------------------------------------------------------------------------
Ran 1 tests in 0.060s

PASSED (successes=1)