I built an app with forge platform, everything was working fine, but for the last two days, the app only loads when I run the forge tunnel from my vscode, and If I didn’t do that, the app doesn’t load on my atlassian project account. it says localhost refused to connect.
the app uses CUSTOM UI, I tried to uninstall/install the app, but doesn’t solve the problem
anyone knows how to fix this?
IF someone could help me out I would be really thankful
I even create a new forge app with
Forge Create → Jira Custom UI app
then built my react app and
Forge Deploy &&
Forge Install it.
but still the app only loads when I run
Forge Tunnel from my vscode
Where are you hosting your custom ui at ? When you’re not tunnelling - the requests should be hitting that server. Can you check the logs on it to see what the errors are?
You mean host it on a third-party server? I don’t host it anywhere.
I just create a custom ui app with forge templates, then deploy and install it.
it was reachable for the last week, but since two days ago, it only works when I run the tunneling from my local pc.
there is no errors, when I click on the app on my dashboard, only a white blank page appears.
Sorry - my brain got confused with the connect hosting within forge feature.
If you’re doing a react app - you’ll need to add ‘unsafe-inline’ .
It’s okay. thanks
There is nothing wrong the CSP. and there is no Error on my console either.
The problem is the app doesn’t load without tunneling, even I deploy and install it multi times on my dashboard and it behave like this in the last two days.
before that app was working fine. I even rebase my code base to 4days ago, but nothing changed
This is my manifest.yaml , maybe that helps:
- key: some-key
title: The Title
- key: resolver
- key: main
name: App Name
I think I fixed the problem.
The Problem was related to ‘react-router-dom’
I used it for routing in my react app, and for my root page ( the ‘/’ page ) I used the
exact attribute .
<Route exact path='/'>
and I think this was the conflict for Forg to find out how to print the first page, So I was keep getting blank white page without any errors.
the weird part that confused me was that the app worked fine with
Forge Tunnel , and that was the reason that I thought maybe the problem is related to Tunneling.
I had the same problem today. When I checked browser’s logs, I have seen that forge can’t load static assets for my custom UI.
When I building my custom ui, it writes following statement in the logs:
The project was built assuming it is hosted at /
You can control this with the homepage field in your package.json.
So I have added “homepage”: “.” to my package.json file of custom ui and build it again. This fixed the issue.