Forge Tunnel prevents plugin from rendering content

$ node --version
v20.11.0

$ npm --version
10.8.2

$ forge --version
10.3.0

When creating a new project following the steps:

  1. Navigate to the directory where you want to create the app. A new subdirectory with the app’s name will be created there.
  2. Create your app by running:
forge create
  1. Enter a name for your app (up to 50 characters). For example, hello-world-app.
  2. Select the UI Kit category.
  3. Select the Confluence product.
  4. Select the confluence-global-settings template.
  5. Change to the app subdirectory to see the app files:
cd hello-world-app

Then installing the plugin with:

forge deploy

followed by:

forge install

You can view the plugin in action as per screenshot:
rendered-plugin

Based on https://developer.atlassian.com/platform/forge/tunneling/ the forge tunnel command uses Cloudflare in the Atlassian Forge used by this example.

When running the command:

$ forge tunnel
Tunnel redirects requests you make to your local machine. This occurs for any Atlassian site where your app is installed in the specific development environment. You will not see requests from other users.
Press Ctrl+C to cancel.


=== Running forge lint...
No issues found.

=== Bundling code...
✔ Functions bundled.
✔ Resources bundled.

Listening for requests...

and refreshing the page where plugin is installed. Neither the Hello, world! get displayed. Resulting on:
what-happened-to-render

How to resolve this issue?

Hi @rafael.sperafico

I’ve followed your steps and was not able to reproduce the issue. So I’m wondering if you could check the following:

  • check if the app does work when not using a tunnel, like make a change in the frontend code and do forge deploy - if this works, then
  • start the forge tunnel with forge tunnel and check if you have a cloudflare process running (ps aux | grep cloudflared in a different terminal would show) and reload the page. If the output of the tunnel doesn’t show something with INFO 15:55:30.637 79e5859a-df4a-4e38-bdbe-ba0b3196b3f5 { payload: { example: 'my-invoke-variable' }, then the frontend is not calling and you should check the frontend for errors on the console

Also wondering, what operating system are you using? To rule out differences in cloudflared

Please let me know how you go

1 Like

Hi Taco,

Despite of creating the Atlassian Forge using UI Kit, I had to change the web browser from Safari to Chrome or Firefox. Once the change was made, tunnelling started working.

Could you please update the information in https://developer.atlassian.com/platform/forge/tunneling/#tunneling-with-custom-ui informing users to ONLY USE Chrome and Firefox regardless of using Custom UI or UI Kit. Furthermore, add this information in the information provided when executing the tunnel command, so users can look which browsers are supported.

Kind regards,
Rafael

1 Like