Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: while installing forge app over connect app

I have following manifest

modules:
  confluence:spaceSettings:
    - key: conf-xxx-xxx
      resource: main
      resolver:
        function: resolver
      title: xxx xxx xxx
      route: xxx
  function:
    - key: resolver
      handler: index.handler
    - key: appInstalled
      handler: index.appInstalledHandler
    - key: appUpgraded
      handler: index.appUpgradedHandler
    - key: migrationEventHandeller
      handler: index.eventhandler
      timeoutSeconds: 600
  consumer:
    - key: migration-consumer
      # Name of the queue for which this consumer will be invoked
      queue: migration-queue
      resolver:
        function: migrationEventHandeller
        # resolver function to be called with payload
        method: process-migration-data
  scheduledTrigger:
    - key: xxx-remote-scheduled-trigger
      endpoint: remote-trigger-node
      interval: fiveMinute
  endpoint:
      - key: remote-trigger-node
        remote: connect
        route:
          path: /fit-trigger
        auth:
          appSystemToken:
            enabled: true
  trigger:
    - key: app_installed
      function: appInstalled
      events:
        - avi:forge:installed:app
    - key: app_upgraded
      function: appUpgraded
      events:
        - avi:forge:upgraded:app
resources:
  - key: main
    path: static/xxx/build
remotes:
  - key: connect
    baseUrl: https://63fb-2405-201-1001-e1bc-7d04-843-67a8-9a68.ngrok-free.app
    operations:
      - compute
    auth:
      appSystemToken:
        enabled: true
connectModules:
  confluence:lifecycle:
    - key: lifecycle-events
      installed: /installed
permissions:
  scopes:
    - read:connect-confluence
    - act-as-user:connect-confluence
    - storage:app
    - search:confluence
    - read:app-system-token
    - readonly:content.attachment:confluence	
  content:
    styles:
      - 'unsafe-inline'
app:
  id: ari:cloud:ecosystem::app/7c3d0b9c-c130-4666-9a76-48474dc32684
  connect:
    key: xxxx.xxx
    remote: connect
    authentication: jwt
  runtime:
    name: nodejs20.x
  licensing:
    enabled: true
  storage:
  1. I install connect app using ngrok url. which works.
  2. Then i deploy my forge app.
  3. Then i forge install upgrade --environment shivtest
    This is giving me below error
? Do you want to continue? Yes

× Installing your app in Confluence on to DEV shivtest...

Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: Request to /installed failed with a status code 400. Check the app host is available and try again. For more help on this issue, please reach out to support (https://developer.atlassian.com/support) and provide them the following request ID: db6c5ac9-6a8c-4f11-9fee-eafaab15dbd1

Your app in shivtest was not installed to any contexts on https://shivforgetest.atlassian.net/.

On connect app i get below error

{} Authentication verification error (400):  Unable to decode JWT token: Error: error:1E08010C:DECODER routines::unsupported
POST /installed 400 916.106 ms - 79

What is the reason. It was working before.

Thanks
Shiv

We have the same problem in specific instances :confused:

Hi
We have received a few reports about this error and are working with our teams.

Regards,
Deepak

Hi we wanted to let you know that we have deployed a fix for this issue and all reports from existing support tickets are positive.
If you are still seeing this error please open a support request so that we can assist you.

I’m getting the following error in my case.

Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: Request to /lifecycle failed with a status code 503. Check the app host is available and try again. For more help on this issue, please reach out to support (https://developer.atlassian.com/support) and provide them the following request ID: a985203c-f6d4-4f61-8369-c0c2dc5d29be

Having the same issue
sometimes code 5XX, sometimes 4XX

Getting: Authentication verification error (401): JWT claim did not contain the correct audience (aud) claim

Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: Request to /installed failed with a status code 401. Check the app host is available and try again.

Hi we are seeing similar error but without the status code -

Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: Request to /lifecycle failed. Check the app host is available and try again. For more help on this issue, please reach out to support (https://developer.atlassian.com/support) and provide them the following request ID: f357c16f-4b02-4d6c-8ed8-d8c7fb37d92c

Any idea about this? Is it the same, how do you deal with it?

I’m also getting same error, after deploy when I try to forge install --upgrade getting this below error

"Error: Error performing sync with Connect: LIFECYCLE_HOOK_FAILED: Request to /installed failed with a status code 404. Check the app host is available and try again. "

Errors like this can be due to various reasons. Things to check:

  • Your Connect Server is still up and running and exposed to the internet - if not you’ll probably see 503s
  • The remotes.baseUrl domain in your manifest is correct - if you’re using a tunnel with a dynamic subdomain, have you updated it in the manifest and done a forge deploy? If not you’ll probably see 503s or 404s
  • The base URL is correctly set in your app server - for atlassian-connect-express connect apps this is set via localBaseUrl in config.json or the AC_LOCAL_BASE_URL environment variable - if this is wrong you’ll see aud validation issues
  • You’ve ported the lifecycle into connectModules - confluence:lifecycle or jira:lifecycle and installed points to the right path - if this is incorrect you’ll see 404s and if it’s missing altogether you’ll see 401s or 403s because your app won’t have registered the new secret.

If you’ve checked all of those and still are not having any success maybe we broke something and you should let us know (but hopefully not)!