Forge Tunnel got stuck

Hi @ianRagudo ,

I am trying with new CLI 10.2.0 but it got stuck. Could you let me know any troubleshooting steps?

Forge tunnel got stuck without any error:

dchoukse@mypc:/mnt/d/git_repositories/abc-jira-forge/capacity/abc-jira-forge$ forge tunnel --verbose
▶️  GraphQL https://api.atlassian.com/graphql
Query:
        query forge_cli_getUserDetails {
          me {
            user {
              name
              accountStatus
              accountId
            }
          }
        }
Variables: {}
◀️  GraphQL
Request ID: 2e48f24a1fee48b4899540f8f0f1b420
Result: {
  "me": {
    "user": {
      "name": "Dipesh Chouksey",
      "accountStatus": "active",
      "accountId": "wrwrwrwrwr23535"
    }
  }
}
▶️  GraphQL https://api.atlassian.com/graphql
Query:
        query forge_cli_getUserDetails {
          me {
            user {
              name
              accountStatus
              accountId
            }
          }
        }
Variables: {}
◀️  GraphQL
Request ID: 751c24d432cc4516a91f8ae33c36354awerw
Result: {
  "me": {
    "user": {
      "name": "Dipesh Chouksey",
      "accountStatus": "active",
      "accountId": "712020:a89fhfgh2605b-7a64-4af9-95d0-9e528643dabf"
    }
  }
}
▶️  GraphQL https://api.atlassian.com/graphql
Query:
        query forge_cli_getUserDetails {
          me {
            user {
              name
              accountStatus
              accountId
            }
          }
        }
Variables: {}
◀️  GraphQL
Request ID: 8d667ab57d9048a3994086ete18cc620f0f
Result: {
  "me": {
    "user": {
      "name": "Dipesh Chouksey",
      "accountStatus": "active",
      "accountId": "712020:a892dfhh605b-7a64-4af9-95d0-9e528643dabf"
    }
  }
}
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.
Tunnel provider: Cloudflare
Press Ctrl+C to cancel.

▶️  GraphQL https://api.atlassian.com/graphql
Query:
      mutation forge_cli_setupApplicationTunnel($input: RegisterTunnelInput!) {
        registerTunnel(input: $input) {
          success
          errors {
            message
            extensions {
              errorType
              statusCode
            }
          }
          tunnelId
          tunnelToken
          tunnelUrl
        }
      }

Variables: {
  "input": {
    "appId": "ari:cloud:ecosystem::app/063caab5-ad41-40eb-b578-0fa74b236323",
    "environmentKey": "default"
  }
}
▶️  GraphQL https://api.atlassian.com/graphql
Query:
        query forge_cli_getUserDetails {
          me {
            user {
              name
              accountStatus
              accountId
            }
          }
        }
Variables: {}
◀️  GraphQL
Request ID: 8dae8d6494ec4d7c81dgfg934ffe92466a2a
Result: {
  "me": {
    "user": {
      "name": "Dipesh Chouksey",
      "accountStatus": "active",
      "accountId": "712020:4646a892605b-7a64-4af9-95d0-9e528643dabf"
    }
  }
}
◀️  GraphQL
Request ID: 3de899e96b7640ee95a3d0f46cc64e8f
Result: {
  "registerTunnel": {
    "success": true,
    "errors": null,
    "tunnelId": "7efe2831-9c19-dg-9528-a48f633411ff",
    "tunnelToken": "eyJhIjoiMWY2YzEyYTE2ZmNlMWM5OTFhNzM2NWEzYTk1ZTJlMGIiLCJ0IjoiN2VmZTI4MzEtOWMxOS00N2RiLTk1MjgtYTQ4ZjYzMzQxMWZmIiwicyI6ImNISnZaRjgzTVRJd01qQTZZVGc1TWpZd05XSXROMkUyTkMwMFlXWTVMVGsxWkRBdE9XVTFNamcyTkROa1lXSm1YMlZoWkRnM05HTmxMV1ExWWpRdE5HTTVOeTA1T1RkbUxUSTBNRFF5TkRjNE1qSmxaUT09In0=",
    "tunnelUrl": "https://7efe2831-9c19-47db-9528-a48f633411ff.tunnel.atlassian-dev.net"
  }
}

It still happens?
What you mean stuck? Invocation still hit your local code?

Hi @KhanhNguyen,

Yes, It dose not show any error. It just stuck on below step:

D:\git_repositories\demo-jira-forge>forge tunnel --verbose
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.
Tunnel provider: Cloudflare
Press Ctrl+C to cancel.

▶️  GraphQL https://api.atlassian.com/graphql
Query:
      mutation forge_cli_setupApplicationTunnel($input: RegisterTunnelInput!) {
        registerTunnel(input: $input) {
          success
          errors {
            message
            extensions {
              errorType
              statusCode
            }
          }
          tunnelId
          tunnelToken
          tunnelUrl
        }
      }

Variables: {
  "input": {
    "appId": "ari:cloud:ecosystem::app/063caab5-ad41-fdsfd-b578-0fa74b236323",
    "environmentKey": "default"
  }
}
◀️  GraphQL
Request ID: c76cce61f33f4bcdae2sdf5a2a92a23c0c3
Result: {
  "registerTunnel": {
    "success": true,
    "errors": null,
    "tunnelId": "70c8fbe3-db88-48c6-sfsf-5651f8fb85fe",
    "tunnelToken": "eyJhIjoiMWY2YzEyYTE2ZmNlMWM5OTFhNzM2NWEzYTk1ZTJlMGIiLCJ0IjoiNzBjOGZiZTMtZGI4OC00OGM2LWFiY2YtNTY1MWY4ZmI4NWZlIiwicyI6IasdmNISnZaRjgzTVRJd01qQTZZVGc1TWpZd0sfsfsE5rWWpNdE5EVTBaaTA1TmpZekxUaGtabU0xWW1FeU9USXhNZz09In0=",
    "tunnelUrl": "https://70c8fbe3-db88-48c6-abcf-5651f8fb85fe.tunnel.atlassian-dev.net"
  }
}


It dose not show any error or any other warring after registerTunnel true.

I should be able to see below logs if it works fine :

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.

Listening for requests...

> 

Hi @dchouksey89, apologies for missing this out and thanks @KhanhNguyen for engaging the question.

I think this question merits its own topic, so I moved it to a new one.

1 Like

Hi @dchouksey89,

I seem to have run into the same or at least a very similar problem - when I try to start the Forge tunnel on our company network, it stalls early on. In any other network, it works just fine.

Did you this resolved?
If so, how?

Thanks,
Fredrik

Hi @freatt ,

No, Issue still persist. I am not sure how to resolve it.

To bad.
I just submitted an ECOHELP ticket to try to get some answers and to find a solution.

Thanks,
Fredrik

Have you already followed the steps mentioned in the documentation below?

At the bottom of the page, there is a link for Cloudflare tunnel connections that provides a list of IP ranges and ports that you need to whitelist on the corporate network.

4 Likes

That page was new to me. Just got the following from Atlassian and will try to get the whitelisting done on our side:

The Forge CLI versions 10.1.0 and above use Cloudflare for tunneling. The below page provides the IP range and port that need to be whitelisted on the corporate network:

Tunnel with firewall | Cloudflare Zero Trust docs

For more information about using the Forge CLI on a corporate network, please refer to the documentation below:

https://developer.atlassian.com/platform/forge/enterprise/use-forge-cli-on-corporate-network/

Thanks,
Fredrik

2 Likes

Hi,

With the Cloudflare whitelisting, the forge tunnel now works as expected!

Thanks,
Fredrik

1 Like