Pocketmine-mp: Resource pack with metadata entry in manifest.json does not load

Created on 28 Nov 2020  路  4Comments  路  Source: pmmp/PocketMine-MP

Issue description

  • Expected result: Pack loads
  • Actual result: [Server thread/CRITICAL]: Could not load resource pack "nethergames.zip": manifest.json is missing required fields

Steps to reproduce the issue

  1. Create a dummy resource pack
  2. Add format_version, header and modules to manifest.json
  3. Load server : success
  4. Add optional metadata to manifest.json
  5. Pack does not load

Code that causes the issue

https://github.com/pmmp/PocketMine-MP/blob/master/src/resourcepacks/json/Manifest.php
is missing optional metadata
https://github.com/pmmp/PocketMine-MP/blob/70b0d832583c162484458e1ef4dbc70c174ea7b4/src/resourcepacks/ZippedResourcePack.php#L111-L116
Throws misleading error ("missing required fields" at any time)
https://github.com/pmmp/PocketMine-MP/blob/70b0d832583c162484458e1ef4dbc70c174ea7b4/src/resourcepacks/ZippedResourcePack.php#L113
Can not map successfully and throws JsonMapper_Exception if additional fields are provided

OS and versions

  • PocketMine-MP: PocketMine-MP 4.0.0+dev for Minecraft: Bedrock Edition v1.16.100 (protocol version 419)
  • PHP: 7.4
  • Server OS: Win10

Plugins


Plugins (4): DEVirion v1.2.5-ALPHA13, DevTools v1.15.0+dev, FormImagesFix v0.0.1, xendevtools2 v0.0.0

  • If you remove all plugins, does the issue still occur? Yes

Crashdump, backtrace or other files


Core Bleeding Edge Fixed

All 4 comments

Is the metadata field an officially accepted thing? There's no spec on this stuff so I'm never sure.

Thanks, I didn't know that documentation existed.

Fixed by 07dc0f2dd56c07b3c52e6bec976e12ad8b071250.

Was this page helpful?
0 / 5 - 0 ratings