Skip to content

Latest commit

 

History

History
31 lines (29 loc) · 7.14 KB

troubleshooting.md

File metadata and controls

31 lines (29 loc) · 7.14 KB

Troubleshooting

"Normalize" below is npx @missing-elements/h5p-normalize@latest course.h5p. It writes course.normalized.h5p, the same content with its media rewritten to stream. It needs Node 22 or later.

Symptom Cause Fix
error: no-cors Package host sends no CORS headers, or is unreachable: the browser cannot tell the two apart Add CORS headers on the host, or have the user download the file and use file
error: network, "is an http: URL and this page is served over https:" src or libraries is http:// on an https:// page Use the https:// URL. http://localhost works as is
error: no-worker Page on http://, in-app browser without Service Workers, sw cross-origin, or a frame sandboxed without allow-same-origin Use https://; show "Open in Safari / Chrome"; serve h5p-sw.js from your origin; add allow-same-origin to the frame's sandbox, or drop the attribute
Worker or runtime files 404 after build Bundler does not analyse new URL(…, import.meta.url) (esbuild), or the runtime property is not set Set player.runtime; or serve both packages' dist/ and set sw + assets-base
Console: creating a worker from blob: violates worker-src The page refuses blob: workers; the element falls back to h5p-jobs.js Set jobs to that file to skip the attempt. If error: no-worker follows, h5p-jobs.js is missing or not same-origin
Video won't play in Safari, other browsers fine h5p-sw.js older than the element (installed without a build step) Re-copy h5p-sw.js; the console warns when the versions differ
Console: 503 from the worker for a media file, after about 30 s Nothing of the entry arrived for 30 s: the extracting tab closed or the host stopped answering Reload. If it repeats, check the host answers Range requests promptly
error: quota Not enough storage after evicting everything idle: a host without Range, where the whole archive must land, or one large deflated entry Show event.detail.message (size needed, usage against quota). Normalize the package, or move it to a host that supports ranges
error: bad-archive, "Could not read the archive index" The bytes are not a whole zip: a login page, a truncated upload, or an old element on a compressing host curl -s -D - -r 0-1 <url> should print a 206 and a body of PK; unzip -t a download. Update the element
error: bad-archive, "contains no libraries" An export with content/ but no library folders (h5p.com, h5p.org), played trusted with no libraries Drop trusted, or set libraries="pack", with pack-base or the pack property for your own copy of the pack (and its libraries.txt); or re-export with libraries. event.detail.missingLibraries names them
error: bad-archive, "played untrusted, so its own copy of … does not run" The package carries a library the library sources do not have (missingLibraries.carried), and an untrusted package's own libraries never run Set trusted only for a package you made or trust; or name a source that has the library in libraries
error: network, "redirects to " A package played trusted, or a .h5p in libraries, whose address redirects to another origin, which would then choose the code Give its address on the origin that serves it
Console: 404 for <Library>-<major>.<minor>/library.json on load The runtime probing folder names Ignore it. One per load is expected
Console: "could not be brought up to the library versions served, and plays as written" The content was written for an older version of a library than the one served, and that library's upgrade step failed on it The content plays with its parameters as written, so a part may be missing. Re-export it from a site with current libraries, or play it with the libraries it was exported with
Console: "violates the following Content Security Policy directive" Content loads from an origin the frame does not permit Built in: MathJax CDNs, Google WebFont, YouTube, Vimeo, Panopto, and Timeline's Wikipedia, Vimeo, SoundCloud and Flickr media (played untrusted, the default, they leave out the MathJax and WebFont scripts). Add anything else to allow-origins
AR Scavenger shows its title and no camera view It injects A-Frame and AR.js as inline scripts, which the frame's policy refuses in every mode Not supported; the frame's CSP says why
No copyright button with frame copyright h5p.json names no licence, U, or one H5P does not know (such as MIT) Give h5p.json a licence H5P knows (CC BY, CC0 1.0, GNU GPL, PD, C, …)
Formulas show as raw LaTeX, \(…\) or $$…$$ The package lacks H5P.MathDisplay, and the pack supplied nothing. The player adds the pack's MathDisplay to content with formulas, as the H5P plugins do, only when the pack supplies or refreshes a library of the package (Addons) Set libraries="pack" (the default, untrusted, uses it already), or add H5P.MathDisplay-1.0/ to the archive and H5P.MathDisplay to preloadedDependencies. The pack's MathDisplay 1.0.50 renders with MathJax from its own folder, offline too
"This package is missing 1 of its libraries" for a package that carries every library its h5p.json names One of its libraries asks, in its own library.json, for a version the package does not carry, usually an old export Drop trusted, or set libraries="pack": the pack supplies it
Console: "played at an older version than the content names" The content was made for a newer minor version of a library than any source has, usually on h5p.com just after a release the pack has not caught up with. It plays at the newest older minor, without what the newer version added Most content plays as made. Where a part is missing or drawn wrong, re-export it with its libraries and play it trusted, if you trust where it came from, or wait for the pack. downgrade-libraries="off" refuses such a package instead. Content newer than the pack
A video shows nothing for a long time, then plays (often the first of several) The mp4 is deflated in the zip and not faststart, so it plays nothing until its last byte; videos are extracted one at a time Normalize the package; until then, preload="auto" starts the transfer early
A video never starts after the host stays down for minutes The player retries a silent or dropped link for a few minutes, then fails the entry with an error event Reload once the host is back
error: runtime, content blank Content type threw, usually for a library missing from the archive or a script blocked by the frame CSP Check the console inside the frame; report the archive
error while the content works A non-fatal runtime exception, common on resize, or one media file that failed to extract (network, quota, its name first in the message). state stays ready Log it; hide the player only when state is error
YouTube video: error: runtime naming youtube.js H5P.Video up to 1.6.66; the player works around it, so the video plays Re-export with H5P.Video 1.6.80 or later to lose the error