Forge CustomUI app not loading anymore

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.

index.html:1 GET net::ERR_ABORTED 403
index.html:1 GET 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.


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

Can confirm it is an issue with relative paths in the index.js

For me my package.json was missing the line

"homepage": ".",
1 Like