question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`H5P.getLibraryPath(<lib>)` returns `"undefined/<...>"`

See original GitHub issue

When running a H5P using the new librariesPath parameter that needs to call H5P.getLibraryPath(<lib>) (for example to load assets) that call returns "undefined/<...>".

This.librariesPath = <path> is correctly written to the console, however, and everything else runs correctly, except for the fact that assets aren’t loaded because the path is wrong.

Also, when I don’t specify a librariesPath, I immediately get This.librariesPath = [object Object] written to the console, and the main H5P library isn’t even loaded because it tries to load /[object%20Object]/<lib>/library.json.

This happens when I build from current master (85c11382a84dd17989a252f427ecc56c1c0c82be), which appears to be the correct version for 2.1.1 if I’m parsing the commit history correctly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Jakeiicommented, May 26, 2020

Seems I wasn’t paying attention for the last PR, this should be fixed now, and tagged in 2.1.2. Also have setup CI to hopefully catch this sort of thing…

0reactions
raloktcommented, Jun 4, 2020

Ah yes, that’s a lot cleaner than just fixing the hack, of course. You’re welcome!

Also I can confirm that it works now - thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

H5P API Reference — Namespace
Indicates if H5P is embedded on an external page using iframe. ... Browser prefix to use when entering fullscreen mode. undefined means no...
Read more >
Issues after library update - H5P
How can we force reinstall of the library now that the Hub is in place ... Uncaught TypeError: Cannot read property 'prototype' of...
Read more >
Get current library version to use with getLibraryPath - H5P
Hi,. I am developping an h5p editor widget. I need to manualy import some javascript during execution (I can't use preloadedJs).
Read more >
Can't update some content types /translation[i] undefined - H5P
After I upgraded all contenttypes and h5p-activity to the newest version I can't update some ... Console: translation[i] is undefined.
Read more >
h5p content not appear in wordpess post
Hi,. It's hard to say exactly what is wrong, but it appears like your server is not able to find the correct library...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found