Wikibase Entity compression issues are occurring in a freshly installed minimal development environment, which causes browser tests to fail as well as disables users from adding Statements to Items.
Steps to reproduce:
- Create a new local MediaWiki dev env, by following the instructions in MediaWiki-Docker > Quickstart and DEVELOPERS.md.
- Clone and install the Wikibase extension according to instructions in Wikibase/Installation up until the end of the "Run maintenance scripts" section.
// Autogenerated code ... wfLoadSkin( 'Vector' ); wfLoadExtension( 'WikibaseRepository', "$IP/extensions/Wikibase/extension-repo.json" ); require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php"; wfLoadExtension( 'WikibaseClient', "$IP/extensions/Wikibase/extension-client.json" ); require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
- Go to Special:NewItem in your local wiki and add an item to test on
- Go to Special:EntityData/Q1.json.
Current behavior:
Returned entity data is compressed and unreadable (unparseable). This breaks the Wikibase Item UI (users are not able to add statements) and consequently the browser tests fail when run locally.
Expected behavior:
Entity data is returned either with proper content-encoding header or in json, so that the browser is able to parse the response body.
Hints:
- Install fresh-node in order to run browser tests, and run the following commands from the mediawiki root to reproduce the error without worrying about browser version etc. The test should pass when the Entity data is correctly encoded.
$ fresh-node -env -net $ cd extensions/Wikibase $ npm ci $ npm run selenium-test:repo -- --spec repo/tests/selenium/specs/item.js
- This seems to be related to the issues described in T235554: MediaWiki::outputResponsePayload seemingly causes net::ERR_HTTP2_PROTOCOL_ERROR 200 and compression issues in 1.35
- Same issue as T253644: Gzip compression problems on some pages