Moodle restore not working with h5p

Hello,

I'm using Moodle 3.1.3+ (Build 20161215) with h5p. I've updated to the latest version of h5p and updated the libraries as well.

When I attempt to restore a course that has h5p activities it fails to complete after several minutes most of the time. I see this error:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

If it does complete, the restored course has restored activities and resources only to the first position that an h5p activity should be and stops. Moodle returns this error upon completion:

A required parameter (contextid) was missing

More information about this error
https://docs.moodle.org/31/en/error/moodle/missingparam

No h5p activites are ever restored, in either case.

I see the backup/restore feature was added in 2017:

https://h5p.org/blog/feb-2017-release-note-moodle-improvements#backup

So I wonder what is peculiar about my installation that still precipitates a failure.

Is anyone familiar with this?  Thanks.

-----------------------------------------------

an update: I tried backing up and restoring courses with Moodle 3.4 and still getting the same errors. Is this working for anyone? thanks.

We're seriuosly needing some help resolving this issue as soon as possible. I have posted a job on Upwork to fund this.

https://www.upwork.com/jobs/~01e81dbb439546cbbb

thanks.