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.

V8: assetsService.load doesn't load any assets missing an expected file extension so promise never returns

See original GitHub issue

assetsService.load doesn’t load any assets missing an expected file extension (anything other than js or css) and the promise never returns.

I’ve marked the issue as V8 but it also exists in late V7.

Reproduction

Steps

Try to load any assets without a file extension, for example:

assetsService
    .load(["https://www.bing.com/api/maps/mapcontrol?branch=release"])
    .then(onAssetsLoad, onAssetsError);

Specifics

Looks like it was broken by this change to add support for loading CSS and JS (instead of just JS): https://github.com/umbraco/Umbraco-CMS/commit/50f8f185031593c2f89f6c98eb2abf347da5c4b5#diff-ca9e001eb1d67c6dccdfdd7aeff07f77

Expected result

I would probably expect the function to assume any unmarked assets were JS and load them accordingly. I would also accept some kind of descriptive error.

Actual result

The load method doesn’t load the asset and the promise never returns.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
harry-gordoncommented, Oct 15, 2019

I finally have an afternoon put aside to work on this, you should receive my first Umbraco contib later today 🤞.

0reactions
nul800sebastiaancommented, Oct 29, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise / Async / Await Inconsistencies / Issue #5294
It appears that if you return ANY object through a Promise w/ async/await it will also return Class<Promise> , breaking code.
Read more >
Assets from file not loaded under certain network/browser ...
Hi all, I developed all locally with a node.js simple webserver where all worked fine. Then I moved it to my remote server...
Read more >
Assets file project.assets.json not found. Run a NuGet ...
when I use the right click on the solution and selecting Restore Nuget Packages I get this message: All packages are already installed...
Read more >
TSConfig Reference - Docs on every TSConfig option
The value of extends is a string which contains a path to another configuration file to inherit from. The path may use Node.js...
Read more >
Configuring Jest
It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if it...
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