V8: assetsService.load doesn't load any assets missing an expected file extension so promise never returns
See original GitHub issueassetsService.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:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I finally have an afternoon put aside to work on this, you should receive my first Umbraco contib later today 🤞.
Fixed in https://github.com/umbraco/Umbraco-CMS/pull/6713