z1haze / sfcc_dev_console

A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
MIT License
19 stars 1 forks source link

Critical resources cannot be fetched from CDN #7

Open eismail-aiopsgroup opened 4 months ago

eismail-aiopsgroup commented 4 months ago

Very often critical resources like https://unpkg.com/monaco-editor@0.50.0/min/vs/loader.js cannot be fetched (502 Bad Gateway) and because of that, the console fails to load. I'm not sure if the cartridge is requesting this file, or it's loaded by an NPM package but perhaps it's better to have them stored locally if possible.

The page tries to load for a minute: image image

When not being able to fetch the JS file, the editor is not available: image

The same happens with files like:

So it looks like there's something wrong with unkp.com. As a workaround, I open the failed files in the browser directly, and it helps for the next load. But even in this case, I'm sometimes receiving a bad gateway error.

z1haze commented 4 months ago

Yes, this been an intermittent issue for years now. We use moncao from cdn to avoid the hassle that comes with setting up web workers on sfcc as well as keeping the editor itself current.

It has been a few years since I've visited this issue, so maybe it is easier to dp now. If I can get some time to experiment, I will. Otherwise, a PR is always welcome if you're feeling up to it!