Forge CustomUI app not loading anymore

Hi,
I was experimenting with Forge and my Forge app was working fine. I think I have changed nothing but it started not loading js and css files referenced from index.html of custom ui. I’m using development environment, @forge/bridge@1.4.0. Browser’s log shows that it can able to load index.html for custom UI but it can’t load the referenced js and css files. I have checked build directory of custom ui. JS and CSS files are correctly referenced from index.html and they are present int he build folder.

ET https://59175091-1282-4a9e-9f02-904afeee7843.cdn.prod.atlassian-dev.net/static/css/2.0811ce48.chunk.css net::ERR_ABORTED 403
index.html:1 GET https://59175091-1282-4a9e-9f02-904afeee7843.cdn.prod.atlassian-dev.net/static/css/main.5531abcb.chunk.css net::ERR_ABORTED 403
GET https://59175091-1282-4a9e-9f02-904afeee7843.cdn.prod.atlassian-dev.net/static/js/2.19404638.chunk.js net::ERR_ABORTED 403
index.html:1 GET https://59175091-1282-4a9e-9f02-904afeee7843.cdn.prod.atlassian-dev.net/static/js/main.ff10da6a.chunk.js net::ERR_ABORTED 403

I have found the problem. In my case it is caused by an unused import api from “@forge/api”; declaration which is probably added incorrectly and silently by Webstorm when I pasted a code block.

5 Likes

In case it’s helpful to anyone else, I encountered this after refactoring my UI build script and accidentally switched my asset paths to be absolute (instead of relative (per the docs). If you have absolute paths to your assets in your index.html, then you’ll get the same 403 errors.

1 Like