HELP/TROUBLESHOOTING
Troubleshooting
Start with the phase that fails and keep the message of p2lrn:error. Do not disable integrity to hide a symptom.
Player does not load
- 1.Check that
/player/current/dist/p2lrn.jsresponds. - 2.Run
customElements.get('p2lrn-player'). - 3.Check
srcand Network. - 4.Listen
p2lrn:error. - 5.If the package opens but does not render, check the presentation or runtime environment.
CORS
Symptom: The request to the package or external party fails before the Player can verify it. Checks the origin of the application, the OPTIONS response when preflight exists and Access-Control-Allow-Origin. * only opens cross-origin reading; does not authorize a user.
contentRoot or digest integrity error
The packet, graph, or payload changed after calculating integrity or arrived corrupt. Rebuild or recover the correct artifact. Do not manually edit the digest to match.
Presentation not available
Query P2LRN.renderizadors(). Si fijaste renderizador, verifies that its id exists and that it accepts profile/mediaType/rendering location. The Player only fallbacks in expected incompatibility categories.
Multipart: one part is missing
The descriptor uses hrefs relative to the .p2lrn. Verify that all .partNNN are published with the package and are not renamed. If a part exists but changes, its SHA-256 must fail.
HTTP Range
The Player can open remote packages in ranges. If the server does not support the expected pattern, check responses 206, Content-Range and proxy/CDN limits. The current transport can change to full read when it does not have range.
The configured runtime shares origin with the application
SCORM and H5P: the Player automatically switches to the internal opaque source sandbox. You don't need to create another domain just to play this content.
Managed runtime or generic executable package: si has configurado runtime-base-url expressly for an environment that requires another origin, uses a different domain, subdomain, or port. A different route to the same origin does not constitute isolation.
An H5P library is missing
The automatic sandbox attempts to fill in dependencies that are not within the sandbox. .h5p using the catalog runtime-host/h5p-libraries/index.json located next to the Player. Check that this corpus is published along with the runtime assets. If you use the optional Node runtime, also check the libraries directory configured in that service.
SCORM does not start
Check that the SCORM entry point exists within the package and that the browser allows the iframe sandbox. If the configured runtime shares origin with the application, the Player automatically uses the internal sandbox instead of requiring another server.
End event does not arrive
The Player's current contract uses p2lrn:complete, no p2lrn:completion. For state uses p2lrn:statechange; for progression changes use p2lrn:progressionchange. Also verify that the specific renderer emits that event.
Failure to save progress
If Host Adapter.saveState() fails, the Player issues p2lrn:error with phase progression-save. learner status belongs to the Host; don't try to write it inside the package.
Quick diagnosis
Run these checks in the console when you need to quickly distinguish between a loading, Player mounting, or API availability issue.
const player = document.querySelector('p2lrn-player');
player.addEventListener('p2lrn:error', (event) => {
console.error(event.detail);
});
console.table(P2LRN.renderizadors());
console.log(P2LRN.version, P2LRN.toolkitVersion);Is it still failing?
Includes package URL, event p2lrn:error and failure phase.