Skip to content

Await connection never resolve #4

@riderx

Description

@riderx

i tried yesterday and all was working well but today i cannot await connections it never resolve.

if i stop to await it works as expecter, maybe they latest release changed somehting ?

If i run cloudflared without your script here is the logs, it seems that changed :

❯ cloudflared tunnel --url localhost:5173/
2023-04-12T11:34:58Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps
2023-04-12T11:34:58Z INF Requesting new quick Tunnel on trycloudflare.com...
2023-04-12T11:35:00Z INF +--------------------------------------------------------------------------------------------+
2023-04-12T11:35:00Z INF |  Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):  |
2023-04-12T11:35:00Z INF |  https://tricks-discharge-practices-adjustment.trycloudflare.com                           |
2023-04-12T11:35:00Z INF +--------------------------------------------------------------------------------------------+
2023-04-12T11:35:00Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
2023-04-12T11:35:00Z INF Version 2023.4.0
2023-04-12T11:35:00Z INF GOOS: darwin, GOVersion: go1.19.3, GoArch: amd64
2023-04-12T11:35:00Z INF Settings: map[ha-connections:1 protocol:quic url:localhost:5173/]
2023-04-12T11:35:00Z INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/as-a-service/
2023-04-12T11:35:00Z INF Generated Connector ID: 113ab5ba-b7f0-4b8f-a653-6c39e9f83525
2023-04-12T11:35:00Z INF Initial protocol quic
2023-04-12T11:35:00Z INF ICMP proxy will use 192.168.100.59 as source for IPv4
2023-04-12T11:35:00Z INF ICMP proxy will use fe80::499:3255:222a:a5fe in zone en0 as source for IPv6
2023-04-12T11:35:00Z INF Created ICMP proxy listening on 192.168.100.59:0
2023-04-12T11:35:00Z INF Created ICMP proxy listening on [fe80::499:3255:222a:a5fe%en0]:0
2023-04-12T11:35:00Z INF Starting metrics server on 127.0.0.1:50774/metrics
2023-04-12T11:35:01Z INF Connection 836e3aee-3da1-4a9e-b0d2-e812480915f1 registered with protocol: quic connIndex=0 ip=198.41.192.37 location=OTP

I did read here they have only one connection now:
https://github.com/cloudflare/cloudflared/blob/master/CHANGES.md

Due to the nature of QuickTunnels (https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/do-more-with-tunnels/trycloudflare/) and its intended usage for testing and experiment of Cloudflare Tunnels, starting from 2023.3.2, QuickTunnels only make a single connection to the edge

and if i change the code by :

   for (const connection of connections) {
     const res = await connection;
     console.log('connection done', res);
   }
   // await Promise.all(connections);

I can see only one appear. it look it's this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions