Big Problem with Page Publish Trigger

Dear Forge Community,

i currently have a big Problem with two Forge Macros on our Confluence Cloud Instance. Up until today in the morning everything worked fine, but now my two Macros who share the same Trigger are no longer working in Production and Test Environments.

The Trigger looks as following:

import api from "@forge/api";

//ListenerMainMethod, constantly running.
//Listener checks if a confluence page was published.
//Subsequently the Listener checks if he needs to add a tag.
//Adds the correct tag if required.

export async function run(event) {
    
    // check the event data was received, return a message if not
    if (!event) {
        console.log('Invalid event');
        return {"msg": "invalid event"};
    }

    console.log("Test 1");

    // check the event received was an issue created event, return a message if not
    if (event["activityItem"]["eventType"] === 'PUBLISHED') {

        console.log("Test 2");

        let url = event["activityItem"]["object"]["url"].toString();
        let regex = /spaces\/([^\/]+)\//;
        let m = regex.exec(url);
        let spacekey = m[1];

        if( spacekey === "CUDO") {

            let id = event["activityItem"]["object"]["localResourceId"];
            let alias = "", title = "";
            let version;
            let result = await getAncestors(id);

This code should trigger when a Confluence Page is Published and then check if other Criteria is fulfilled. I now added the two console.log Commands to check if the Code is reached and i don’t get any log Entries.

In the Past i already had this Problem when the Authetication asApp was changed and as soon as i Permitted the two App Users to write in the Space everything worked again.

I am at a total loss why sometime during today without any Code Change or Deployment this stopped working.

Please help.

Best Wishes
Michael

The Manifest looks like this:

permissions:
  scopes:
    - read:confluence-content.summary
    - write:confluence-content

modules:
  trigger:
    - key: publish-confluence-page
      events:
        - avi:activity:published:page
      function: update_title

  function:
    - key: update_title
      handler: update_title.run
app:
  id: ari:cloud:ecosystem::app/81cc0b83-6377-4223-b388-9f0591d7a9f1
  name: page_create_listener_cudo_prefix

Have you redeployed your app recently? Upcoming removal of developer-based app authentication

There’s an active incident that’s likely to be related. I had the same problem with missing triggers in the past 8hrs.

https://confluence.status.atlassian.com/

2 Likes

Hallo @rmassaioli,
Thanks for your answer, but i switched to the new App based Authentication soon after it was available.

Best Wishes
Michael

@RogerBarnes Thanks for your Answer,

i wouldn’t have guessed, that this incident could impact the Triggers. Thanks.

Best Wishes
Michael

It seams the Triggers are working again.

Thanks for your Answers

1 Like