Forge tunnel so hard to enable

It’s been a week, looking on the web and trying different kind of install combination and still it won’t work.

The current error I get is:
PS E:\Developpement\Jira\Plugins\MakeTunnelWork> forge tunnel -d
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.

node:events:491
throw er; // Unhandled ‘error’ event
^

Error: listen EADDRINUSE: address already in use :::8000
at Server.setupListenHandle [as _listen2] (node:net:1485:16)
at listenInCluster (node:net:1533:12)
at Server.listen (node:net:1621:7)
at new WebSocketServer (C:\Users\Uli\AppData\Roaming\npm\node_modules@forge\sandbox-tunnel\node_modules\ws\lib\websocket-server.js:90:20)
at ChromeInspector.startServer (C:\Users\Uli\AppData\Roaming\npm\node_modules@forge\sandbox-tunnel\node_modules@forge\runtime\out\sandbox\inspector.js:97:21)
at StartTunnelCommand.execute (C:\Users\Uli\AppData\Roaming\npm\node_modules@forge\sandbox-tunnel\node_modules@forge\tunnel\out\command\start-tunnel-command.js:73:89)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runTunnel (C:\Users\Uli\AppData\Roaming\npm\node_modules@forge\sandbox-tunnel\out\index.js:34:24)
Emitted ‘error’ event on Server instance at:
at emitErrorNT (node:net:1512:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: ‘EADDRINUSE’,
errno: -4091,
syscall: ‘listen’,
address: ‘::’,
port: 8000
}

Node.js v18.12.0
PS E:\Developpement\Jira\Plugins\MakeTunnelWork>

On a Windows 10 PC.
But nothing is running on port 8000 from what I can tell, I even disabled the firewall for a while, but no change.
Can you help me, tell me what to re-install in which version, or what setting I need to change ?

Thanks for the help.

Try TCPView für Windows - Sysinternals | Microsoft Learn to see what is using the port…

1 Like

Thanks for the response.
I just did that and still nothing is using 8000.

It’s evolving now tunnelling works for UI kit 2 apps, and it’s awesome!!

But still not with custom UI apps, even with a fresh “Hello world” custom UI app.
Also this is weird, it doen’t check or try to put in place the container image anymore.

and the tunnel command returns after just after printing “=== Snapshotting functions…”

Any advice of things to try to enable tunnel for custom UI apps

Here is the full console output:

forge tunnel
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. 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…
:heavy_check_mark: Functions bundled.

=== Snapshotting functions…

1 Like

Hello @Uli,

Would you be able to post the output of forge tunnel --verbose so we can check at which step the process fails? In case you prefer to not share the entire output publicly, feel free to raise a support ticket in the Developer Support portal instead and we can help you take a look.

Cheers,
Rodrigo Heinzen
Developer Support Engineer

1 Like

Hi @heinzen ,

Thanks for your answer.

No problem sharing anything, especially since this is the hello word basic app.

here is the forge tunnel --verbose:

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.
Press Ctrl+C to cancel.

t=2024-04-17T12:31:06+0200 lvl=info msg="open config file" path=C:\\Users\\Uli\\AppData\\Local\\ngrok\\ngrok.yml err=nil
t=2024-04-17T12:31:06+0200 lvl=dbug msg="starting component" obj=app name="signal handler"
t=2024-04-17T12:31:06+0200 lvl=dbug msg="starting component" obj=app name="Tunnel session"
t=2024-04-17T12:31:06+0200 lvl=dbug msg="starting component" obj=app name=web
t=2024-04-17T12:31:06+0200 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040 allow_hosts=[]    
t=2024-04-17T12:31:06+0200 lvl=dbug msg="starting component" obj=app name=updater
t=2024-04-17T12:31:06+0200 lvl=dbug msg="connecting to" obj=tunnels.session addr=connect.us.ngrok-agent.com:443
t=2024-04-17T12:31:06+0200 lvl=dbug msg="checking for updates periodically" obj=updater interval=6h0m0s      
t=2024-04-17T12:31:06+0200 lvl=dbug msg="check for update" obj=updater
t=2024-04-17T12:31:06+0200 lvl=dbug msg=dial obj=tunnels.session network=tcp address=connect.us.ngrok-agent.com:443 timeout=10s
t=2024-04-17T12:31:06+0200 lvl=info msg=start pg=/api/tunnels id=e570b65d5ba4f8d1
t=2024-04-17T12:31:06+0200 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=e570b65d5ba4f8d1 err="a successful ngrok tunnel session has not yet been established"
t=2024-04-17T12:31:06+0200 lvl=info msg=end pg=/api/tunnels id=e570b65d5ba4f8d1 status=503 dur=1.9995ms      
t=2024-04-17T12:31:07+0200 lvl=info msg=start pg=/api/tunnels id=0abce2df124c0554
t=2024-04-17T12:31:07+0200 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=0abce2df124c0554 err="a successful ngrok tunnel session has not yet been established"
t=2024-04-17T12:31:07+0200 lvl=info msg=end pg=/api/tunnels id=0abce2df124c0554 status=503 dur=616.4µs       
t=2024-04-17T12:31:07+0200 lvl=dbug msg="open stream" obj=tunnels.session obj=csess id=23eda4e0a942 reqtype=0 err=nil
t=2024-04-17T12:31:07+0200 lvl=dbug msg="encode request" obj=tunnels.session obj=csess id=23eda4e0a942 sid=3 
req="&{Version:[3 2] ClientID: Extra:{OS:windows Arch:amd64 Authtoken:HIDDEN Version:3.8.0 Hostname: UserAgent:ngrok-agent-go/3.8.0 ({\"proxy_type\":\"none\",\"config_version\":\"2\"}) ngrok-go/1.9.1 Metadata: Cookie: 
HeartbeatInterval:10000000000 HeartbeatTolerance:15000000000 Fingerprint:<nil> UpdateUnsupportedError:0xc0006883a0 StopUnsupportedError:0xc0006883a0 RestartUnsupportedError:0xc0006881a0 ProxyType: MutualTLS:false ServiceRun:false ConfigVersion: CustomInterface:false CustomCAs:false ClientType:ngrok-agent-go LegNumber:0}}" err=nil
t=2024-04-17T12:31:07+0200 lvl=info msg=start pg=/api/tunnels id=ceac9359bebbc8e1
t=2024-04-17T12:31:07+0200 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=ceac9359bebbc8e1 err="a successful ngrok tunnel session has not yet been established"
t=2024-04-17T12:31:07+0200 lvl=info msg=end pg=/api/tunnels id=ceac9359bebbc8e1 status=503 dur=0s
t=2024-04-17T12:31:07+0200 lvl=dbug msg="no update available" obj=updater
t=2024-04-17T12:31:07+0200 lvl=dbug msg="decoded response" obj=tunnels.session obj=csess id=23eda4e0a942 sid=3 resp="&{Version:3 ClientID:805ccd8bfb1abe243dfc5241925ead76 Error: Extra:{Version:prod Region:us Cookie:2CWpoxBPjhOBaUNaS1kvSQt7JAgLo0B0$OymvKWdexkBx1jNXi2ezrdcHV54wQFuK+D4gpKlkVg9qm51USunVhXjc7y7ECp588DuN33/qC2BUtgp/4xeiKSBpukVh2sPSgFcNobzU+uRhjdPjPwnkJGoL84oV05KLT04OJIspGz1kOjG1uymYqpUOM30QiaI9XxiVz7VJYAvniUsdPvqoCnAcNMbELbvP/iZCtU8abV2yAHdKXuWi2saNxHmvXkaDtRGOxIoxw6QEOWoANKyUcoBnAwqbF8NUW7zw9tKfrwK4Vf969XUiipU= AccountName:Uli 
SessionDuration:0 PlanName:Free Banner:Take our ngrok in production survey! https://forms.gle/aXiBFWzEA36DudFn6 DeprecationWarning:<nil> ConnectAddresses:[]}}" err=nil
t=2024-04-17T12:31:07+0200 lvl=info msg="client session established" obj=tunnels.session
t=2024-04-17T12:31:07+0200 lvl=info msg="tunnel session started" obj=tunnels.session
Tunnel connection status changed: connected
t=2024-04-17T12:31:07+0200 lvl=dbug msg="received extras" obj=tunnels.session region=us version=prod
t=2024-04-17T12:31:07+0200 lvl=info msg=start pg=/api/tunnels id=03514542522b560f
t=2024-04-17T12:31:07+0200 lvl=dbug msg="open stream" obj=tunnels.session obj=csess id=23eda4e0a942 clientid=805ccd8bfb1abe243dfc5241925ead76 reqtype=1 err=nil
t=2024-04-17T12:31:07+0200 lvl=dbug msg="encode request" obj=tunnels.session obj=csess id=23eda4e0a942 clientid=805ccd8bfb1abe243dfc5241925ead76 sid=7 req="&{ID: ClientID: Proto:https ForwardsTo:http://localhost:64772 
ForwardsProto: Opts:0xc00063ea90 Extra:{Token: IPPolicyRef: Metadata:}}" err=nil
t=2024-04-17T12:31:07+0200 lvl=dbug msg="decoded response" obj=tunnels.session obj=csess id=23eda4e0a942 clientid=805ccd8bfb1abe243dfc5241925ead76 sid=7 resp="&{ClientID:07c036d6acd6ad821e0263d1e4b6574c URL:https://83f4-88-166-225-129.ngrok-free.app Proto:https Opts:map[Auth: BasicAuth:<nil> CircuitBreaker:<nil> Compression:<nil> Domain: HostHeaderRewrite:false Hostname:83f4-88-166-225-129.ngrok-free.app IPRestriction:<nil> LocalURLScheme: MutualTLSCA:<nil> OAuth:<nil> OIDC:<nil> Policy:<nil> ProxyProto:0 RequestHeaders:<nil> ResponseHeaders:<nil> Subdomain: UpstreamCAPEM:<nil> UserAgentFilter:<nil> VerifyUpstreamTLS:false WebhookVerification:<nil> WebsocketTCPConverter:<nil>] Error: Extra:{Token:oQ+bAdftm59FkznHBazZytqYv3t3Y9Pz$hXT08d/gkmArzdJlvXzaafGikRnc42iJWdi6wWGAGfcxuj2RVzmdmk4J34T32N14QfnXkq+OQ6a+u3GkES6eEb+/jsIOktlSdwqEQDxLe8eAkbJkeBHtSFNF/BKRmZe6e6Ex8snA/ggw31YgClfpvxP/nhskVaYyhU6lZjrfQEFIW6rbPJAzwtkuWjA+xiGb2IlLLQs0mVfi9/36X17zOoOOU24PamlvUK/qkjl3jXVVfow3rulqZCLgL5ufgO+fc8IkyLoOcH7q1Oiatr3RIv1+JeQgDuVcpYurx5Xi1DtJSwwzZZx/5WoPTmWuAs8k9wdGd48uIY/cM16ohfdTCo4VCJKb/Xmj13QmP96BUi+GwARgqVUgLsQtUimvUh+vUVDON8HmgxifjoWaTt/HaAyhDu0uiZjyRIKXQhqvZGOfcXHGLVKQAttnpbso/tRq2LpQ//kCEeBrW3cRnkjSoSd4B1gYjLxwGihVNjxbegXBbWosKTpsvjp6EOD37+IZehMWcoGwZEy4DsjrdesO/lP/HZT9HHlbYgvV3AXL7JhDrWiQ1pI50D6e5EFIKHT5EIVgdZvzqwAAk8VzvZTqhYeKO3XIExWCYZ7Tq+pL7gHeT/hVeMQlb7/uwbNHCFiir6CKvQa9ff7OVkUdzfwlNnwulj4y6j3wUxeA4S7EHglhcfZbjIOHJmqsAUxuwIWvQrLoyb6l604kmz8Uj3gNhqpl0JpZPURL0w==}}" err=nil
Started tunnel at address: https://83f4-88-166-225-129.ngrok-free.app
▶️  GraphQL https://api.atlassian.com/graphql
Query:
      mutation forge_cli_createApplicationTunnels($input: CreateAppTunnelsInput!) {
        createAppTunnels(input: $input) {
          success
          errors {
            message
            extensions {
              errorType
              statusCode
            }
          }
          keepAlive
        }
      }

Variables: {
  "input": {
    "appId": "ari:cloud:ecosystem::app/5d93e889-84a8-440e-b4af-5b17e669cbe9",
    "environmentKey": "default",
    "tunnelDefinitions": {
      "faasTunnelUrl": "https://83f4-88-166-225-129.ngrok-free.app/",
      "customUI": [
        {
          "tunnelUrl": "http://localhost:8000/",
          "resourceKey": "main"
        }
      ]
    },
    "force": true
  }
}
t=2024-04-17T12:31:07+0200 lvl=dbug msg="start tunnel listen" obj=tunnels.session name=173bc8fb-38d2-4ca1-9df0-439752743016 proto=https opts="&{Domain: Hostname: Subdomain: Auth: HostHeaderRewrite:false LocalURLScheme:http ProxyProto:0 VerifyUpstreamTLS:false UpstreamCAPEM:[] Compression:<nil> CircuitBreaker:<nil> IPRestriction:<nil> BasicAuth:<nil> OAuth:<nil> OIDC:<nil> WebhookVerification:<nil> MutualTLSCA:<nil> RequestHeaders:<nil> ResponseHeaders:<nil> WebsocketTCPConverter:<nil> UserAgentFilter:<nil> Policy:<nil>}" labels=map[] err=nil
t=2024-04-17T12:31:07+0200 lvl=info msg="started tunnel" obj=tunnels name=173bc8fb-38d2-4ca1-9df0-439752743016 addr=http://localhost:64772 url=https://83f4-88-166-225-129.ngrok-free.app
t=2024-04-17T12:31:07+0200 lvl=info msg=end pg=/api/tunnels id=03514542522b560f status=201 dur=143.4095ms    
◀️  GraphQL
Request ID: a4adc68d228242c1a150b7be5f8921cc
Result: {
  "createAppTunnels": {
    "success": true,
    "errors": null,
    "keepAlive": "1713351607979"
  }
}

=== Running forge lint...
No issues found.

=== Bundling code...
✔ Functions bundled.

=== Snapshotting functions...
PS ...\MakeTunnelWork> 

you can see that there is no docker image check (I don’t know why)

Now since the first post here I manage to make it work but loosing the capacity to use Resolvers (which is bad since I want to use forge storage and from wht I understand I’ll need resolver for it).

Here is how I manage to make tunnel work:

I changed the initial src/index.js:


import Resolver from '@forge/resolver';
import api, { route } from '@forge/api';
const resolver = new Resolver();



resolver.define('fetchLabels', async (req) => {
  const key = req.context.extension.issue.key;

  const res = await api.asUser().requestJira(route`/rest/api/3/issue/${key}?fields=labels`);

  const data = await res.json();

  const label = data.fields.labels;
  if (label == undefined) {
    console.warn(`${key}: Failed to find labels`);
    return [];
  }

  return label;
});

export const handler = resolver.getDefinitions();

into:

export { handler } from './resolvers';

and creating a resolver folder, with an empty index.js file in it.

and removing the use of invoke in the code for this test.

And with that running:

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.
Press Ctrl+C to cancel.

t=2024-04-17T12:51:22+0200 lvl=info msg="open config file" path=C:\\Users\\Uli\\AppData\\Local\\ngrok\\ngrok.yml err=nil
t=2024-04-17T12:51:22+0200 lvl=dbug msg="starting component" obj=app name="Tunnel session"
t=2024-04-17T12:51:22+0200 lvl=dbug msg="starting component" obj=app name=web
t=2024-04-17T12:51:22+0200 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040 allow_hosts=[]
t=2024-04-17T12:51:22+0200 lvl=dbug msg="starting component" obj=app name=updater
t=2024-04-17T12:51:22+0200 lvl=dbug msg="checking for updates periodically" obj=updater interval=6h0m0s
t=2024-04-17T12:51:22+0200 lvl=dbug msg="check for update" obj=updater
t=2024-04-17T12:51:22+0200 lvl=dbug msg="starting component" obj=app name="signal handler"
t=2024-04-17T12:51:22+0200 lvl=dbug msg="connecting to" obj=tunnels.session addr=connect.us.ngrok-agent.com:443
t=2024-04-17T12:51:22+0200 lvl=dbug msg=dial obj=tunnels.session network=tcp address=connect.us.ngrok-agent.com:443 timeout=10s
t=2024-04-17T12:51:22+0200 lvl=info msg=start pg=/api/tunnels id=21f3210d41a3b6ee
t=2024-04-17T12:51:22+0200 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=21f3210d41a3b6ee err="a successful ngrok tunnel session has not yet been established"
t=2024-04-17T12:51:22+0200 lvl=info msg=end pg=/api/tunnels id=21f3210d41a3b6ee status=503 dur=641.3µs
t=2024-04-17T12:51:22+0200 lvl=info msg=start pg=/api/tunnels id=a54ea106f651ec91
t=2024-04-17T12:51:22+0200 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=a54ea106f651ec91 err="a successful ngrok tunnel session has not yet been established"
t=2024-04-17T12:51:22+0200 lvl=info msg=end pg=/api/tunnels id=a54ea106f651ec91 status=503 dur=0s
t=2024-04-17T12:51:22+0200 lvl=dbug msg="open stream" obj=tunnels.session obj=csess id=283e971fc163 reqtype=0 err=nil
t=2024-04-17T12:51:22+0200 lvl=dbug msg="encode request" obj=tunnels.session obj=csess id=283e971fc163 sid=3 req="&{Version:[3 2] ClientID: Extra:{OS:windows Arch:amd64 Authtoken:HIDDEN Version:3.8.0 Hostname: UserAgent:ngrok-agent-go/3.8.0 ({\"proxy_type\":\"none\",\"config_version\":\"2\"}) ngrok-go/1.9.1 Metadata: Cookie: HeartbeatInterval:10000000000 HeartbeatTolerance:15000000000 Fingerprint:<nil> UpdateUnsupportedError:0xc0004f8f60 StopUnsupportedError:0xc0004f8f60 RestartUnsupportedError:0xc0004f8d60 ProxyType: MutualTLS:false ServiceRun:false ConfigVersion: CustomInterface:false CustomCAs:false ClientType:ngrok-agent-go LegNumber:0}}" err=nil
t=2024-04-17T12:51:22+0200 lvl=dbug msg="decoded response" obj=tunnels.session obj=csess id=283e971fc163 sid=3 resp="&{Version:3 ClientID:6e643c5a3151b2f1f86ac691c9660e2a Error: Extra:{Version:prod Region:us Cookie:XyR4BscX0RyP98rWQMxCytQKXjxy/ikf$qXpmg1IrzrTZfgL68TyDHdO0D5v5LhxXYLIXo4BRT9JWuO9kJUKNFHGtnofNJ9grJECjrWaKQsJCvyDw8tIKTKlavtjWUIONqjzwMVqQ0AJD+0ajVMVqL7ZVU4bLW0fKN3P/+spF5Fz94b9OycKt1FA0KISxqPirCW/uUZGBAfsB8bvnN3CTUeMR8/VhZ3XFd7Jidlk+MxYdi/CKPFxtQsS39vzaDwtmRrTrifSMwgeP26wVIiedorK3wTtAF59lwUENmOIFcDKQym+biwd4+w== AccountName:Uli SessionDuration:0 PlanName:Free Banner:Try our new Traffic Inspector Dev Preview: https://ngrok.com/r/ti DeprecationWarning:<nil> ConnectAddresses:[]}}" err=nil
t=2024-04-17T12:51:22+0200 lvl=info msg="client session established" obj=tunnels.session
t=2024-04-17T12:51:22+0200 lvl=info msg="tunnel session started" obj=tunnels.session
t=2024-04-17T12:51:22+0200 lvl=dbug msg="received extras" obj=tunnels.session region=us version=prod
Tunnel connection status changed: connected
t=2024-04-17T12:51:23+0200 lvl=info msg=start pg=/api/tunnels id=db78e9eae93b5ca4
t=2024-04-17T12:51:23+0200 lvl=dbug msg="open stream" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a reqtype=1 err=nil
t=2024-04-17T12:51:23+0200 lvl=dbug msg="encode request" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a sid=7 req="&{ID: ClientID: Proto:https ForwardsTo:http://localhost:61738 ForwardsProto: Opts:0xc00078cf70 Extra:{Token: IPPolicyRef: Metadata:}}" err=nil
t=2024-04-17T12:51:23+0200 lvl=dbug msg="no update available" obj=updater
t=2024-04-17T12:51:23+0200 lvl=dbug msg="decoded response" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a sid=7 resp="&{ClientID:5bee4e61ec64724b7858d5608460a7fc URL:https://37a8-88-166-225-129.ngrok-free.app Proto:https Opts:map[Auth: BasicAuth:<nil> CircuitBreaker:<nil> Compression:<nil> Domain: HostHeaderRewrite:false Hostname:37a8-88-166-225-129.ngrok-free.app IPRestriction:<nil> LocalURLScheme: MutualTLSCA:<nil> OAuth:<nil> OIDC:<nil> Policy:<nil> ProxyProto:0 RequestHeaders:<nil> ResponseHeaders:<nil> Subdomain: UpstreamCAPEM:<nil> UserAgentFilter:<nil> VerifyUpstreamTLS:false WebhookVerification:<nil> WebsocketTCPConverter:<nil>] Error: Extra:{Token:a0wMPmStIIyxfz3YMJP983yGVseTBlu1$p1QTf/FOhis4qcNYy52wAM+DoYEkKrZqYiEYel6Qc/GBEbCxICS/WkI7QLVFlA1RhayKzBolzzHtzTD+/x4Fwue4X+kFKbaNXbS+AKPjI4JlfRRK2XL9/f2wyJpLPErvelcTKBZ/izv+zSZMTT7gR3mrGbo2shl5ZwtE18g+nSs/kyFL4zKA786E9njvvSopOTIhrq7iqW/T9mWEY4K/zuEXBXsPr9fPP90EvwgNd+jYMeUv0cv1RVHy9Hhi5XQ8brfV05agvO5cRHTxleX55Z7J6mdxMjkiryYX0Zcs1F4sd0w5kfb0gRO9ogRxXsHT5gYFnUVOyuvFmsBlqDTBpqsFdD5EB8+mDCXQCOenCJvCu/sRgE1eKRotUrJDzeVWD1C/tHDuvyt7qLpdjvnoNpnI/btaBo/ULu7szINGF60GX55iWOL3kOdmyPh5VH0fn32t8hgEqm786MIA8kauYzXtJJ1CeNBr82xKO2E0e9uE3Oy/tP0ZD6zVJKOVTsdywcjMUZm8ghWonmHfJBs5IsZyN2hCVH4ZAoq7r+2fPWxnTYbhH0VcdGDftGAWPlT923ZJTU5MZQBZiK8pYMTQ3iLuOHxd/+AX6JaSDcYVxRTXWUR8PvezIIPBTXif9PluCxHcSlCYQy9iOYoLowWH6dn6zEcQNON2Xzbgmfo+BcvPWZTw33BA41TrZmGWGXbCXM8jXt+29ZuDx/GRg7DcHVnUlB1NPhwn+A==}}" err=nil
Started tunnel at address: https://37a8-88-166-225-129.ngrok-free.app
▶️  GraphQL https://api.atlassian.com/graphql
Query:
      mutation forge_cli_createApplicationTunnels($input: CreateAppTunnelsInput!) {
        createAppTunnels(input: $input) {
          success
          errors {
            message
            extensions {
              errorType
              statusCode
            }
          }
          keepAlive
        }
      }

Variables: {
  "input": {
    "appId": "ari:cloud:ecosystem::app/5d93e889-84a8-440e-b4af-5b17e669cbe9",
    "environmentKey": "default",
    "tunnelDefinitions": {
      "faasTunnelUrl": "https://37a8-88-166-225-129.ngrok-free.app/",
      "customUI": [
        {
          "tunnelUrl": "http://localhost:8000/",
          "resourceKey": "main"
        }
      ]
    },
    "force": true
  }
}
t=2024-04-17T12:51:23+0200 lvl=dbug msg="start tunnel listen" obj=tunnels.session name=868d859a-5552-4a44-a66e-66178547e5ee proto=https opts="&{Domain: Hostname: Subdomain: Auth: HostHeaderRewrite:false LocalURLScheme:http ProxyProto:0 VerifyUpstreamTLS:false UpstreamCAPEM:[] Compression:<nil> CircuitBreaker:<nil> IPRestriction:<nil> BasicAuth:<nil> OAuth:<nil> OIDC:<nil> WebhookVerification:<nil> MutualTLSCA:<nil> RequestHeaders:<nil> ResponseHeaders:<nil> WebsocketTCPConverter:<nil> UserAgentFilter:<nil> Policy:<nil>}" labels=map[] err=nil
t=2024-04-17T12:51:23+0200 lvl=info msg="started tunnel" obj=tunnels name=868d859a-5552-4a44-a66e-66178547e5ee addr=http://localhost:61738 url=https://37a8-88-166-225-129.ngrok-free.app
t=2024-04-17T12:51:23+0200 lvl=info msg=end pg=/api/tunnels id=db78e9eae93b5ca4 status=201 dur=115.2623ms
◀️  GraphQL
Request ID: bc871a2a7354485baedd16f49ca9d5ef
Result: {
  "createAppTunnels": {
    "success": true,
    "errors": null,
    "keepAlive": "1713352823407"
  }
}

=== Running forge lint...
No issues found.

=== Bundling code...
✔ Functions bundled.

=== Snapshotting functions...
No log output.


Listening for requests on local port 61738...

t=2024-04-17T12:51:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:51:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
Serving file index.html for resource main
t=2024-04-17T12:51:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:52:03+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=107
t=2024-04-17T12:52:12+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:52:22+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=106
t=2024-04-17T12:52:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=106
t=2024-04-17T12:52:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=108
t=2024-04-17T12:52:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=107
t=2024-04-17T12:53:02+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=120
Serving file index.html for resource main
t=2024-04-17T12:53:12+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:53:22+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:53:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:53:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:53:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
Serving file index.html for resource main
t=2024-04-17T12:54:02+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=108
t=2024-04-17T12:54:12+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:54:22+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:54:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:54:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:54:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:55:02+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:55:12+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:55:22+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:55:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:55:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:55:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:56:02+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:56:12+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=102
t=2024-04-17T12:56:22+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=105
t=2024-04-17T12:56:32+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=104
t=2024-04-17T12:56:42+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103
t=2024-04-17T12:56:52+0200 lvl=dbug msg="heartbeat received" obj=tunnels.session obj=csess id=283e971fc163 clientid=6e643c5a3151b2f1f86ac691c9660e2a latency_ms=103

And when I change the static part of the code and run:

\MakeTunnelWork\static\hello-world> npm run build

And then update the web browser page, it works!!
But again I lost the ability to use resolvers :frowning:

Btw I have the same behavior on another app that use UI kit 2 (no custom UI in it): declaring resolver I loose tunnel.

Any idea on what I can do ?

(You asked for verbose, I hope that wan’t too much :smiley: )

Hi @Uli,

Could you let us know if you have changed the Node runtime to nodejs18.x in your manifest file? There are more instructions in this document. The reason this might be relevant is because late in 2023 there was a problem with Forge tunnel in Windows systems, specifically, and as far as I recall it has been addressed for the native runtime (or by using Node 20).

The other part of it that I noticed is that your tunnel is that the GraphQL responses point out that your tunnel was started successfully:

"createAppTunnels": {
    "success": true,
    "errors": null,
    "keepAlive": "1713351607979"
  }

On top of that I can see that there was no problem allocating the ports specifically to this tunnel, so I believe the first error we noticed is not a problem anymore.

Hi @heinzen,

Thanks.

I’m not sure that this was you suggestion but indeed adding :

app:
  runtime:
    name: nodejs18.x

Solve the issue, with it tunnel works again !! :slight_smile:
And yes the port thing was resolved, but I have not idea how.

Thanks again, that’s great.

( Now I just have this unrelated issue to tackle Forge storage query : Variable "$range" got invalid value null )

2 Likes