Forge tunnel does not pick up on requests

image

The app is deployed yet when I make a change, it does not pick it up anymore.
Last time I’ve touched this project was october 2020. I also can’t seem to find the Forge Slack anymore.

Were there any changes made that could have influenced this?

1 Like

What version of the CLI are you running? You should be able to check via:

npm -v @forge/cli

I’m certain some things have changed since October 2020. Maybe try uninstalling and re-installing so that you have the most up-to-date CLI:

1 Like

Thanks for your reply!

I’ve just uninstalled and reinstalled forge CLI, it’s running 6.14.5 now yet changes still aren’t picked up unfortunately, I gotta keep searching.

Also, did they discontinue the forge Slack community?

As far as I know the forge Slack workspace was closed, yes.

Do you have dependencies on @forge in your package.json? If yes, did you make sure they are on the newest version available? Also did you try all redeploying, uninstalling, and reinstalling your forge app?

Cheers,
Sven

You might also want to check your firewall so that ngrok (used in the docker container) is able to make and keep an outbound connection.

I’ve had issues with the custom ui proxy but that’s due to me running on a unsupported platform (so that might be another thing to check):
https://developer.atlassian.com/platform/forge/installing-forge-on-macos/
https://developer.atlassian.com/platform/forge/installing-forge-on-linux/
https://developer.atlassian.com/platform/forge/installing-forge-on-windows/

Yes, we wanted to consolidate the community under this umbrella. This is the right place for questions around Forge.

1 Like

Thank you everyone for contributing. Really appreciate it.

I’ve tried uninstalling and reinstalling the application and also updating all the npm packages, yet to no avail, no events are picked up :confused:
Docker is also up-to-date and has worked in the past without me making changes since last tunnel

Can you share more on the file structure of your app and which files you’re making changes to?

Certainly! The bottomline is: when the status of an issue is changed to ‘Done’, the app checks if the issue has a ticketnumber which corresponds to a tcket in our ticketing system.
If it has a ticketnumber, it updates said ticket in our system with information from JIRA.
If it doesn’t, it creates a ticket and updates the issue in JIRA with the ticketnumber.

Currently I’m using an overkill of permissions so I’m gonna go over each of them and remove them one by one to see if this changes anything (trial and error, amiright)

As for the filestructure, it’s a basic confluence app that I’ve built on

And just to be sure, the file that you’re saving changes to and not seeing forge tunnel pickup is src/index.jsx, yeah?

Oh sorry if I worded the problem incorrectly, changes in the index file are picked up by forge tunnel but changing the status of an issue is not picked up nor logged, without me changing the code from last time it did pick up the change of status of an issue

Humble bump

Hi @LarsDePauw,

Changing the status of an issue doesn’t have a dedicated event in Forge and avi:activity:transitioned:issue is not a valid one.

The one to use in this case is the avi:jira:updated:issue. In case of an issue transition the event contains the changelog details and they will tell which field has been updated (you want to check if the status one was modified) and the details of the status transition as part of the from and to field of the Change interface.

This is my manifest.yml:

modules:
  trigger:
    - key: jira-issue-transition
      function: main
      events:
        - avi:jira:updated:issue
  function:
    - key: main
      handler: index.run
app:
  id: ari:cloud:ecosystem::app/<appid>
  name: jira_issue_transition
permissions:
  scopes:
    - read:jira-work

And the index.jsx file:

export async function run(event, context) {
	console.log(`Jira ticket updated: ${event.issue.id} ${event.changelog.items.length}`);
	for(var i = 0; i < event.changelog.items.length; i++){
        console.log(`Changed field "${event.changelog.items[i].field}" from "${event.changelog.items[i].fromString}" to "${event.changelog.items[i].toString}"`)
  	}
}

When the status of a Jira issue is changed, I can see the following in the Forge tunnel:

INFO    05:57:47.087  4ec9a67880bb57e2  Jira ticket updated: 10007 1
INFO    05:57:47.088  4ec9a67880bb57e2  Changed field "status" from "In Progress" to "To Do"

All the details on the Jira updated events are published here: https://developer.atlassian.com/platform/forge/events-reference/jira/#issue-updated

I hope this helps!

Caterina

3 Likes

@ccurti hi ,Can the custom UI use this event? How can I write it? If not, is there any other way to achieve it?