library.json error viewing H5P interactive video

library.json error viewing H5P interactive video

by Dom Royko -
Number of replies: 0
Picture of Plugin developers

I am seeing the following error when trying to view an interactive video h5p activity:

invalid-library-json-file : Could not find library.json file with valid json format for library H5P.TextUtilities-1.3

With debugging turned on, I additionally get:

Warning: file_get_contents(/tmp/requestdir/9ic4/6116cd3958b16/6116cd3958b58/h5p-6116cd3958b72/H5P.TextUtilities-1.3/library.json): 
failed to open stream: No such file or directory in /var/www/moodle/h5p/h5plib/v124/joubel/core/h5p.classes.php on line 1444

I am testing on a clustered system running Moodle 3.10.4 or 3.10.6.  When I create an h5p activity, name it, upload my .h5p file, and click 'Save and Display', the above errors appear.  The activity is created within the course, but trying to view it from the course page shows the same error.  (My .h5p file is >2MB, too large to attach here.)

On moodledemo.net, the activity is created without error, so the cause is not in the .h5p file.  Unzipping the file, I see a fine looking H5P.TextUtilities-1.3/library.json.

What puzzles me is why displaying the activity seems to be looking for the json file in a /tmp/ directory.  Should these files not have been unzipped and moved from /tmp/ either into the database or to the pluginfile filesystem by this point?

This post looks like a similar problem: https://moodle.org/mod/forum/discuss.php?d=415622

[screenshot of error messages]

Average of ratings: -