Last night I completed part 1 and all was well. However this morning (UK) my system could no longer use forge tunnel. The error I get is (with --verbose):
Error: Failed to start tunnel, could not establish a connection.
Error: Failed to start tunnel, could not establish a connection.
at NgrokTunnelFactory.establishTunnel (/tunnel/node_modules/@forge/tunnel/out/tunnelling/tunnel-factory.js:24:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
I am using:
Windows 10 (10.0.19042 Build 19042). Docker and Node.js were installed last night and seem to be fine.
Docker version 20.10.5
Node JS 12…21.0
I have created a new app (hello-world2) to see if this still occurs. And I am struggling to get past this.
Hi @Aryan
This is still occurring for me. I have just tried uninstalling, redeploying and reinstalling.
One thing I may have done wrong is I installed Node JS version 14.something originally. I uninstalled this and installed 12.21.0 when I got warnings after grabbing the API in the second tutorial.
This is the verbose output:
PS H:\JIRADev\hello-world-app2> forge tunnel --verbose
Running your app locally with Docker. The tunnel displays your usage from everywhere the app in the development environment is installed.
Press Ctrl+C to cancel.
Checking Docker image... 100%
Your Docker image is up to date.
▶️ GraphQL https://api.atlassian.com/graphql
Query:
mutation deleteTunnels($input: DeleteAppTunnelInput!) {
deleteAppTunnels(input: $input) {
statusCode
success
message
errorDetails {
code
}
}
}
Variables: {
"input": {
"appId": "ari:cloud:ecosystem::app/cdd7a9ab-c3b9-40d0-ba87-7af53735b861",
"environmentKey": "default"
}
}
◀️ GraphQL
Request ID: de2e9bf053402ad7
Result: {
"deleteAppTunnels": {
"statusCode": 200,
"success": true,
"message": "Deleted tunnel for app cdd7a9ab-c3b9-40d0-ba87-7af53735b861 in environment default",
"errorDetails": null
}
}
Error: Failed to start tunnel, could not establish a connection.
Error: Failed to start tunnel, could not establish a connection.
at NgrokTunnelFactory.establishTunnel (/tunnel/node_modules/@forge/tunnel/out/tunnelling/tunnel-factory.js:24:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Hey @Aryan, it may have been something on our side . It works fine now
~/code/hello-world-confluence-forge master !2 > forge tunnel
Running your app locally with Docker. The tunnel displays your usage from everywhere the app in the development environment is installed.
Press Ctrl+C to cancel.
Checking Docker image... 100%
Your Docker image is up to date.
Reloading code...
=== Running forge lint...
No issues found.
=== Bundling code...
App code bundled.
=== Snapshotting functions...
No log output.
App code reloaded.
Listening for requests...
@RogerGodfrey I’ve raised this issue with our Forge team internally and will get back to you with any solutions they suggest. In the meantime, I suggest checking your firewall settings that may be blocking some traffic from your computer ().
Hi @Aryan
I tried this earlier (about 14:00 uk time) and it failed. However, trying it just now, the Forge Tunnel command now seems to be working with no issues.
When you run forge tunnel we try to find an available port to connect to, but I don’t think this takes into account the user’s local network / firewall settings (e.g: if a port is free but blocked by the firewall)
We’ll aim to have more useful error messages in the upcoming versions of the CLI so it’s easier to debug these errors
As always don’t hesitate to reach out if you have any questions or suggestions about Forge!
Hi Aryan, I have the exact same problem as described above.
Error: Failed to start tunnel, could not establish a connection.
Error: Failed to start tunnel, could not establish a connection.
at NgrokCreateTunnelService.establishTunnel (/tunnel/node_modules/@forge/tunnel/out/tunnelling/services/create-tunnel-service.js:24:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async StartTunnelCommand.startFaaSTunnelServer (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:37:35)
at async StartTunnelCommand.execute (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:70:38)
at async Object.exports.runTunnel (/tunnel/node_modules/@forge/tunnel/out/index.js:31:24)
I’m running
Win 11
Docker 20.10.14
Node 16.15.0
Forge 4.3.1
I’ve tried turning off the firewall completely to verify that isn’t the problem.
I can’t find any information about what to do?
What might be the problem? Is there anything else I can try? Any other log to check?
Hi, the above error where from running in verbose mode. Here’s the full output
Tunnel redirects requests you make to your local machine. This occurs for any Atlassian site where your app is installed in the development environment. You will not see requests from other users.
Press Ctrl+C to cancel.
Checking Docker image... 100%
Your Docker image is up to date.
▶️ GraphQL https://api.atlassian.com/graphql
Query:
mutation forge_cli_deleteApplicationTunnels($input: DeleteAppTunnelInput!) {
deleteAppTunnels(input: $input) {
success
errors {
message
extensions {
errorType
}
}
}
}
Variables: {
"input": {
"appId": "ari:cloud:ecosystem::app/d721d10c-2d00-4c64-8b76-190fab077871",
"environmentKey": "default"
}
}
◀️ GraphQL
Request ID: a93abd32b64f328a
Result: {
"deleteAppTunnels": {
"success": true,
"errors": null
}
}
Error: Failed to start tunnel, could not establish a connection.
Error: Failed to start tunnel, could not establish a connection.
at NgrokCreateTunnelService.establishTunnel (/tunnel/node_modules/@forge/tunnel/out/tunnelling/services/create-tunnel-service.js:24:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async StartTunnelCommand.startFaaSTunnelServer (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:37:35)
at async StartTunnelCommand.execute (/tunnel/node_modules/@forge/tunnel/out/tunnelling/command/start-tunnel-command.js:70:38)
at async Object.exports.runTunnel (/tunnel/node_modules/@forge/tunnel/out/index.js:31:24)
Your problem is most likely a new problem as of today. There are already a couple other threads. I’ll leave this one open in case people need to ask something about the incident:
Otherwise, I’m going to suggest this thread has already wandered a bit. While the general troubleshooting steps here are good, I don’t think we ever pinned down a specific problem with a specific solution; hence, I’m going to lock this thread and encourage the community to open new topics for new problems with Forge tunneling.
Edit: The docs mean what they say. I was wrong about the ngrok aspect see my subsequent correction
The new native Node.js runtime no longer requires a local Docker image for invoking your Forge functions locally. This simplifies the local toolchain for setting up the tunnel, and will improve the performance of your tunnel.
When the runtime leaves preview and becomes GA, I would say this won’t even be a “workaround”. But, during preview, please be aware the new runtime does have some differences and known limitations.