Closed alex19EP closed 3 years ago
Thanks for writing this up!
Searching for [ERROR]
and [FAIL]
in the check log file, tests.rest.client.test_relations
seems to have be failing in its setup:
Traceback (most recent call last):
File "/build/matrix-synapse/src/synapse-1.42.0/tests/unittest.py", line 75, in new
return code(orig, *args, **kwargs)
File "/build/matrix-synapse/src/synapse-1.42.0/tests/unittest.py", line 122, in setUp
return orig()
File "/build/matrix-synapse/src/synapse-1.42.0/tests/unittest.py", line 300, in setUp
self.prepare(self.reactor, self.clock, self.hs)
File "/build/matrix-synapse/src/synapse-1.42.0/tests/rest/client/test_relations.py", line 52, in prepare
self.room = self.helper.create_room_as(self.user_id, tok=self.user_token)
File "/build/matrix-synapse/src/synapse-1.42.0/tests/rest/client/utils.py", line 96, in create_room_as
assert channel.result["code"] == b"%d" % expect_code, channel.result
builtins.AssertionError: {'version': b'1.1', 'code': b'500', 'reason': b'Internal Server Error', 'headers': [(b'Server', b'1'), (b'Date', b'Sat, 18 Sep 2021 20:03:33 GMT'), (b'Content-Type', b'application/json'), (b'Cache-Control', b'no-cache, no-store, must-revalidate'), (b'Access-Control-Allow-Origin', b'*'), (b'Access-Control-Allow-Methods', b'GET, HEAD, POST, PUT, DELETE, OPTIONS'), (b'Access-Control-Allow-Headers', b'X-Requested-With, Content-Type, Authorization, Date')], 'body': b'{"errcode":"M_UNKNOWN","error":"Internal server error"}', 'done': True}
There's also an internal server error in the two failures too:
[FAIL]
Traceback (most recent call last):
File "/build/matrix-synapse/src/synapse-1.42.0/tests/rest/client/test_third_party_rules.py", line 157, in test_cannot_modify_event
self.assertEqual(channel.code, 200, channel.result)
File "/usr/lib/python3.9/site-packages/twisted/trial/_synctest.py", line 424, in assertEqual
super().assertEqual(first, second, msg)
File "/usr/lib/python3.9/unittest/case.py", line 829, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/lib/python3.9/unittest/case.py", line 822, in _baseAssertEqual
raise self.failureException(msg)
twisted.trial.unittest.FailTest: 500 != 200 : {'version': b'1.1', 'code': b'500', 'reason': b'Internal Server Error', 'headers': [(b'Server', b'1'), (b'Date', b'Sat, 18 Sep 2021 20:04:48 GMT'), (b'Content-Type', b'application/json'), (b'Cache-Control', b'no-cache, no-store, must-revalidate'), (b'Access-Control-Allow-Origin', b'*'), (b'Access-Control-Allow-Methods', b'GET, HEAD, POST, PUT, DELETE, OPTIONS'), (b'Access-Control-Allow-Headers', b'X-Requested-With, Content-Type, Authorization, Date')], 'body': b'{"errcode":"M_UNKNOWN","error":"Internal server error"}', 'done': True}
tests.rest.client.test_third_party_rules.ThirdPartyRulesTestCase.test_cannot_modify_event
@alex19EP to understand the cause I think we'd need to see synapse's logs as opposed to the test runner's logs. In the directory where the tests were run there should be a _trial_temp
directory, and within a test.log
file. Could you attach that file? Hopefully that will help us diagnose the internal server errors.
@alex19EP to understand the cause I think we'd need to see synapse's logs as opposed to the test runner's logs. In the directory where the tests were run there should be a
_trial_temp
directory, and within atest.log
file. Could you attach that file? Hopefully that will help us diagnose the internal server errors.
sure heer it is. test.log
The relevant bits seem to be:
2021-09-20 21:43:01+0300 [-] --> tests.rest.client.test_relations.RelationsTestCase.test_aggregation <--
2021-09-20 21:43:01+0300 [-] 2021-09-20 21:43:01,568 - synapse.http.server - 93 - ERROR - POST-6596 - Failed handle request via 'RoomCreateRestServlet': <SynapseRequest at 0x7f0eda170af0 method='POST' uri='/_matrix/client/r0/createRoom?access_token=<redacted>' clientproto='1.1' site='test'>
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/twisted/internet/defer.py", line 1661, in _inlineCallbacks
result = current_context.run(gen.send, result)
StopIteration: []
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/http/server.py", line 258, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/http/server.py", line 446, in _async_render
callback_return = await raw_callback_return
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/rest/client/room.py", line 84, in on_POST
info, _ = await self._room_creation_handler.create_room(
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/room.py", line 759, in create_room
last_stream_id = await self._send_events_for_new_room(
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/room.py", line 915, in _send_events_for_new_room
await send(etype=EventTypes.Create, content=creation_content)
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/room.py", line 904, in send
) = await self.event_creation_handler.create_and_send_nonmember_event(
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/message.py", line 863, in create_and_send_nonmember_event
event, context = await self.create_event(
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/message.py", line 623, in create_event
event, context = await self.create_new_client_event(
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/util/metrics.py", line 91, in measured_func
r = await func(self, *args, **kwargs)
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/handlers/message.py", line 964, in create_new_client_event
context = await self.state.compute_event_context(event, old_state=old_state)
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/state/__init__.py", line 347, in compute_event_context
event.event_id,
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/events/__init__.py", line 507, in event_id
compute_event_reference_hash(self)[1], urlsafe=True
File "/build/matrix-synapse/src/synapse-1.42.0/synapse/crypto/event_signing.py", line 121, in compute_event_reference_hash
event_json_bytes = encode_canonical_json(event_dict)
File "/usr/lib/python3.9/site-packages/canonicaljson.py", line 73, in encode_canonical_json
s = _canonical_encoder.encode(json_object)
File "/usr/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.9/site-packages/canonicaljson.py", line 29, in _default
return obj._dict
AttributeError: 'frozendict.frozendict' object has no attribute '_dict'
Which points to matrix-org/python-canonicaljson#36.
Do the tests pass if you require frozendict < 2.0.6?
Do the tests pass if you require frozendict < 2.0.6?
yes tests pass on python-frozendict 2.0.3-1
I think this is fixed by https://github.com/matrix-org/synapse/pull/10902
Description
hello. I am trying to update synaps to 1.42.0 in Arch Linux some test are failing on 1.42.0 and 1.41.1 version. i think it has something to do with new packages in our repositories. since some time ago version 1.41.1 passed all tests successfully.
synaps dependencies versions
Repository : extra Name : libwebp Version : 1.2.1-2 Description : WebP library and conversion tools Architecture : x86_64 URL : https://developers.google.com/speed/webp/ Licenses : BSD Groups : None Provides : libwebp.so=7-64 libwebpdecoder.so=3-64 libwebpdemux.so=2-64 libwebpmux.so=3-64 Depends On : libpng libjpeg libtiff giflib Optional Deps : freeglut: vwebp viewer Conflicts With : None Replaces : None Download Size : 333.30 KiB Installed Size : 1087.96 KiB Packager : Jan Alexander Steffens (heftig)Steps to reproduce
all tests should pass successfully. I will attach build and check logs if someone who knows the code base and understands the testing system can give a hint - I will be very grateful.
Version information
Version: 1.41.1 and 1.42.0
Install method: distribution package
Platform: Arch Linux
matrix-synapse-1.42.0-1-x86_64-build.log matrix-synapse-1.42.0-1-x86_64-check.log