Forge app only works on tunnel

Hi. I’m trying to use tailwindcss + typescript in project page in my forge application.

If I run with forge tunnel -e development, it works as expected and tailwindcss is working fine.

But after I deploy it to development and I run the application from the jira page, it shows

localhost refused to connect.

I’ve correctly built with react-scripts build and got build/ directory. What else should I check?

Hi @TonyPark ,

This doesn’t seem like a Forge problem, but rather something in your code or Custom UI build configuration trying to connect to localhost. However, there’s not a lot of information here to provide much further assistance.

Regards,
Dugald

@TonyPark Can you confirm whether you’re using relative paths when building your app?https://developer.atlassian.com/platform/forge/custom-ui/#accessing-static-assets

I’ve seen one other circumstance where this happens.

If you’ve been testing your app using forge tunnel, and then you close the tunnel, any browser windows that have been using that Forge tunnel will continue trying to connect to localhost until you refresh the page.

By refresh the page, I’m referring to a full reload, not navigating to a different Jira issue or Confluence page, since Jira and Confluence are SPAs, and so navigating around doesn’t actually count as a page reload.