element-hq / element-hq/synapse
HTML preview unit tests fail with libxml2 2.14.2
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
`tests.media.test_html_preview.OpenGraphFromHtmlTestCase.test_no_tree` no longer passes after upgrading to libxml2 2.14.2.
This is probably not Synapse's problem, filing here for the record.
### Steps to reproduce
- build Synapse against https://archive.archlinux.org/repos/2025/04/21/$repo/os/$arch (before libxml2 2.14.2 was uploaded)
- ⇒ observe tests passing
- build Synapse against https://archive.archlinux.org/repos/2025/05/01/$repo/os/$arch (after libxml2 2.14.2, but before python-lxml 5.4.0)
- ⇒ observe tests failing
### Homeserver
N/A
### Synapse Version
1.128.0+
### Installation Method
Other (please mention below)
### Database
N/A
### Workers
Single process
### Platform
Arch Linux (see above) / x86_64
### Configuration
_No response_
### Relevant log output
```shell
[FAIL]
Traceback (most recent call last):
File "/build/matrix-synapse/src/matrix-synapse/build/lib.linux-x86_64-cpython-313/tests/media/test_html_preview.py", line 329, in test_no_tree
self.assertIsNone(tree)
File "/usr/lib/python3.13/unittest/case.py", line 1303, in assertIsNone
self.fail(self._formatMessage(msg, standardMsg))
twisted.trial.unittest.FailTest: is not None
tests.media.test_html_preview.OpenGraphFromHtmlTestCase.test_no_tree
-------------------------------------------------------------------------------
Ran 4016 tests in 29.560s
FAILED (skips=181, failures=1, successes=3834)
```
### Anything else that would be useful to know?
Also filed for libxml2 as https://gitlab.gnome.org/GNOME/libxml2/-/issues/907.
Contributor guide
Assessment
This issue has not been assessed yet.