Forge Confluence trigger not firing in Staging after successful deployment

I’m building a Forge app for Confluence Cloud, and I’ve hit a problem with a Confluence trigger that only fails on our Staging environment.

My manifest has two page-lifecycle triggers. Both work fine on Development, but neither one fires on Staging - even though every deploy and install step says it worked.

Manifest trigger config:

trigger:
  - key: source-page-deleted-trigger
    function: source-deleted
    events:
      - avi:confluence:trashed:page
  - key: source-page-updated-trigger
    function: source-updated
    events:
      - avi:confluence:updated:page

Trigger → function → handler flow:

avi:confluence:updated:page
        ↓
source-page-updated-trigger
        ↓
source-updated
        ↓
index.handleSourceUpdated

Environment: Staging

What I’ve checked so far:

  • forge lint passes, no issues
  • forge deploy -e staging --non-interactive --approve MAJOR_VERSION_RULE finishes fine, and shows the scope upgrade was accepted:
  ✔ Deployed
  Deployed to the staging environment with 1 approval acknowledged.
  • forge install --upgrade --site ... --product confluence -e staging also finishes fine, and confirms the new write:confluence-content scope was granted:
  Your app will be upgraded with the following additional scopes:
  - write:confluence-content
  ✔ Upgrade complete!
  • Developer Console shows the Staging install as UP TO DATE
  • The exact same trigger setup works on Development, no problem
  • I waited over 30 minutes before testing again, so it doesn’t look like a delay issue
  • I manually ran the migrations again through a webtrigger just to check - nothing new ran, so it’s not a database problem
  • I searched the Forge logs for both trigger functions on Staging, tried different time ranges, tried both the function filter and plain text search - no logs show up at all, at any level
  • I directly did the actions that should trigger this, more than once, right on the staging site (moved a page with the macro to trash, and separately edited and saved a page with the macro) - still nothing in the logs afterward

My questions:

Has anyone seen a Forge trigger that works on Development but doesn’t fire at all on an existing Staging install after the trigger is added?
Is there some extra step needed when a new trigger is added to an app that’s already installed somewhere?

Also, other than checking the deploy/install output, is there any way to actually confirm a trigger is registered for a specific site or environment?

I had kind of similar problem with triggers. It was triggered only once after an upgrade. It turned out - code of the triggered function had not awaited properly for all possible promises/asyncs.

Hi @piotr.bojko ,
Thanks. I checked the triggered function, and all the async operations in our source-updated handler are properly awaited, including the DB queries, Confluence API call, response.json(), and DB updates inside the loop. And both triggers are now firing in Staging, so it looks like they just needed some time to become active.

However, we found another issue: avi:confluence:updated:page sometimes doesn’t fire at all.
For example, I removed a macro from a page and saved it, there was no log, not even the first log line that normally appears when the trigger is invoked.

So this doesn’t seem to be just an initial delay after adding the trigger. It looks like the avi:confluence:updated:page trigger can intermittently miss events on our Staging installation.

Could this be related to trigger registration/runtime, or is there anything else you would recommend checking to determine why the event is sometimes missed?