#Network issue: can't connect with Convex

1 messages · Page 1 of 1 (latest)

twilit galleon
#

> [email protected] predev
> convex dev --once

✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at [https://convex.dev/community](https://convex.dev/community) or [email protected]
View the Convex dashboard at [https://dashboard.convex.dev/d/perceptive-bullfrog-52](https://dashboard.convex.dev/d/perceptive-bullfrog-52)

Retrying request (attempt 3/6)...
Retrying request (attempt 3/6)...
Retrying request (attempt 4/6)...
⠸ Downloading current deployment state...
⠧ Downloading current deployment state...
Retrying request (attempt 5/6)...
⠋ Downloading current deployment state...
Retrying request (attempt 6/6)...
✖ Error: Unable to pull deployment config from [https://perceptive-bullfrog-52.convex.cloud](https://perceptive-bullfrog-52.convex.cloud)
✖ TypeError: fetch failed
Failed due to network error, retrying in 529.95ms...
⠹ Downloading current deployment state...
Retrying request (attempt 3/6)...
⠹ Downloading current deployment state...
Retrying request (attempt 4/6)...
⠼ Downloading current deployment state...
Retrying request (attempt 5/6)...
⠏ Downloading current deployment state...
Retrying request (attempt 6/6)...
✖ Error: Unable to pull deployment config from [https://perceptive-bullfrog-52.convex.cloud](https://perceptive-bullfrog-52.convex.cloud)
✖ TypeError: fetch failed
Failed due to network error, retrying in 645.86ms...
#

today I tried a different project with convex using https://better-t-stack.dev and got similar issues:


? What would you like to configure? create a new project
? Project name: better-backend
✔ Created project better-backend, manage it at https://dashboard.convex.dev/t/rafael-3cd17/better-backend
✔ Provisioned a dev deployment and saved its:
name as CONVEX_DEPLOYMENT to .env.local
URL as CONVEX_URL to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or [email protected]
View the Convex dashboard at https://dashboard.convex.dev/d/coordinated-anteater-695

⠦ Checking for index or schema changes...
Retrying request (attempt 3/6)...
⠇ Checking for index or schema changes...
Retrying request (attempt 4/6)...
⠸ Checking for index or schema changes...
Retrying request (attempt 5/6)...
⠹ Checking for index or schema changes...
Retrying request (attempt 6/6)...
✖ Error: Unable to run schema validation on https://coordinated-anteater-695.convex.cloud
✖ TypeError: fetch failed
Failed due to network error, retrying in 419.93ms...
⠴ Checking for index or schema changes...
Retrying request (attempt 3/6)...
⠦ Checking for index or schema changes...
Retrying request (attempt 4/6)...
⠧ Checking for index or schema changes...
Retrying request (attempt 5/6)...
⠹ Checking for index or schema changes...
Retrying request (attempt 6/6)...
✖ Error: Unable to run schema validation on https://coordinated-anteater-695.convex.cloud
✖ TypeError: fetch failed
Failed due to network error, retrying in 957.43ms...
elder mauve
#

This is generally due to local network issues, vpn, that sort of thing

twilit galleon
#

does Convex block Indonesia? I am not on a VPN and have Warp disabled @elder mauve

#

is there a way I could get more info on how to solve this?

twilit galleon
#

went to a different cafe with a different wifi, I am not using VPN and still having this problem

elder mauve
#

Can you run npx convex network-test from your project root and share the result

twilit galleon
#
❯ npx convex network-test
✔ Deployment URL: https://coordinated-anteater-695.convex.cloud
✔ OK: DNS lookup => 52.54.48.130:ipv4 (1.84ms)
✖ FAIL: TCP connect (AggregateError)
#

any clues? @elder mauve

#

would love to get unblocked to work on it this weekend

elder mauve
#

hmm

#

Sparse on details

twilit galleon
#

tried starting a new project but no success yet

❯ npm run dev

> [email protected] predev
> convex dev --once

? What would you like to configure? create a new project
? Project name: convex-tutorial
? Use cloud or local dev deployment? For more see https://docs.convex.dev/cli/local-deployments cloud deployment
✔ Created project convex-tutorial-529a0, manage it at https://dashboard.convex.dev/t/rafael-3cd17/convex-tutorial-529a0
✔ Provisioned a dev deployment and saved its:
    name as CONVEX_DEPLOYMENT to .env.local
    URL as VITE_CONVEX_URL to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or [email protected]
View the Convex dashboard at https://dashboard.convex.dev/d/kindred-parrot-330

Retrying request (attempt 3/6)...
Retrying request (attempt 4/6)...
Retrying request (attempt 5/6)...
Retrying request (attempt 6/6)...
✖ Error: Unable to pull deployment config from https://kindred-parrot-330.convex.cloud
✖ TypeError: fetch failed
Failed due to network error, retrying in 669.33ms...
elder mauve
#

so your browser is good, it's your cli specifically

twilit galleon
#

yeah, any extra debugging ideas? ways to collect more info about the cli connection?

echo sleet
#

here are a few, I also put some better error printing the cli network test for the future

ping -c 4 8.8.8.8
ping -c 4 google.com

nslookup google.com
nslookup kindred-parrot-330.convex.cloud

curl -v http://google.com
curl -v https://google.com

curl -v https://kindred-parrot-330.convex.cloud
twilit galleon
twilit galleon
#

@echo sleet fyi i'm open for a quick call if that helps investigate, can't wait to unblock my local setup. I just cooked a very robust app in basically 1 prompt using Chef and I'm blown away by the result. The app is even better than Replit's output with same prompt and so much easier to use, less friction to deploy etc.

hard heron
#

I'm having the same issues on and off since yesterday

hard heron
echo sleet
#

@hard heron @twilit galleon Couldyou both try upgrading convex (just released [email protected]) and running the network test again, the error should be a little better now

twilit galleon
#
❯ npx convex network-test
✔ Deployment URL: https://utmost-jackal-543.convex.cloud
✔ OK: DNS lookup => 52.44.230.118:ipv4 (1.84ms)
✖ FAIL: TCP connect (AggregateError with 6 errors:
  1. Error: connect ETIMEDOUT 52.44.230.118:443
  2. Error: connect EHOSTUNREACH 2600:1f18:77e:2300:4929:e49b:6cb2:75e6:443 - Local (:::57564)
  3. Error: connect ETIMEDOUT 52.54.48.130:443
  4. Error: connect EHOSTUNREACH 2600:1f18:77e:2302:ddda:86fa:5687:daaa:443 - Local (:::57568)
  5. Error: connect ETIMEDOUT 52.200.179.149:443
  6. Error: connect EHOSTUNREACH 2600:1f18:77e:2301:685b:995f:b5bb:9cbf:443 - Local (:::57572))
#

@echo sleet

echo sleet
hard heron
#

Here's the log

#

Convex auto updated when running convex dev, but

#

For a few times after hte update, the first retry would fail, then it would connect

#

Couldnt recreate that afterwards

#

Working fine now

#

The network test passes too

#

Nvm it just happened again

#

Is this maybe cuz of the vpn? Cuz I have it set to go to Swizerland through sweden

echo sleet
#

Possibly, if the number of vpn hops makes it slower than the 250 ms timeout? ~~Try one more:

NODE_OPTIONS="--dns-result-order=ipv4first" npx convex network-test

or

NODE_OPTIONS="--dns-result-order=ipv4first" npx convex dev
```~~
#

no forget those, try:

NODE_OPTIONS=--no-network-family-autoselection npx convex dev

or

NODE_OPTIONS=--no-network-family-autoselection npx convex network-test
echo sleet
#

this fix will be in the next client release, from your logs it looks to me like it would fix

echo sleet
hard heron
# echo sleet no forget those, try: ``` NODE_OPTIONS=--no-network-family-autoselection npx con...

So, I tried this with the 1.25.2 update, and convex dev works, but this command, and the network test in general fails like this:

- Performing network test...

✔ Deployment URL: https://different-dinosaur-647.convex.cloud
✔ OK: DNS lookup => 52.200.179.149:ipv4 (170.85ms)
✔ OK: TCP connect (267.43ms)
✔ OK: TCP connect (262.87ms)
✔ OK: HTTP check (533.24ms)
✔ OK: HTTPS check (808.33ms)
✔ OK: WebSocket connection established.
✔ OK: echo 128 B (266.43ms, 480.42149539687847 B/s)
✖ FAIL: Network test timed out after 30s.
#

Gonna try wiht 1.25.1 too

#

Same result?

#

No idea why

#
aayan@MacBook-Air-2 dhaba % NODE_OPTIONS=--no-network-family-autoselection pnpm dlx [email protected] network-test > convex_test_output.log 2>&1
aayan@MacBook-Air-2 dhaba % pnpm dlx [email protected] dev  
✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or [email protected]
View the Convex dashboard at https://dashboard.convex.dev/d/different-dinosaur-647

⠧ Fetch failed, is https://different-dinosaur-647.convex.cloud correct? Retrying...
Retrying request (attempt 3/6)...
⠏ Fetch failed, is https://different-dinosaur-647.convex.cloud correct? Retrying...
Retrying request (attempt 4/6)...
⠸ Fetch failed, is https://different-dinosaur-647.convex.cloud correct? Retrying...
aayan@MacBook-Air-2 dhaba % 
aayan@MacBook-Air-2 dhaba % pnpm dlx [email protected] dev
✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local

Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or [email protected]
View the Convex dashboard at https://dashboard.convex.dev/d/different-dinosaur-647

✔ 01:18:37 Convex functions ready! (6.71s)
^C
aayan@MacBook-Air-2 dhaba % 
#

Dev is working though

echo sleet
#

That failure is totally fine, you just have a slower connection

hard heron
#

Guess so

#

I can stream 4k though...

#

Idk anyways, thanks for the fix!

oak edge
#

I had the same issue following a tutorial, and the convex package update resolved the issue for me !

#

same for the network-test

✔ OK: TCP connect (403.15ms)
✔ OK: TCP connect (407.67ms)
✔ OK: HTTP check (820.27ms)
✔ OK: HTTPS check (1.03s)
✔ OK: WebSocket connection established.
✔ OK: echo 128 B (360.35ms, 355.21356875871135 B/s)
✔ OK: echo 4.0 MB (10.93s, 374.9 KB/s)
✔ Network test passed.
twilit galleon
#

1.25.2 fixed it @echo sleet 🙏

#

both dev and network tests are working now

echo sleet
#

Great! Thanks all for reporting.

echo sleet
# hard heron I can stream 4k though...

Hm, that's interesting. Stream as in upload? This final test uploads and downloads 4MB and times out after the whole test gets to 30s. The point is to check that the network can break up data into multiple packets and reassemble them. If you can normally upload 4MB and then download 4MB in 20s then this is surprising. But try again with --timeout 60 or more just to see

#

I'll add a message to the network test mentioning this flag.

hard heron
hard heron
#

In actual usage, everything was working fine