`convex dev` can't reach server
I'm on windows with WSL, this was working fine a few hours ago. Now it's not able to deploy my changes. And it's not unique to this project, I have another that times out and keeps trying like this. I am able to browse convex dashboard, and I can run other commands that access the network so it's likely not a connectivity issue.

34 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Using v1.19.2
can you give us a
npx convex network-test
output?
just for kicks
(or bunx convex network-test
should work too)
@gautamg ^ any ideas?
looking!
Could you also try
curl -v https://little-walrus-398.convex.cloud
?that runs fine

š no different outcome if you run
npx
instead of bunx
, for the network test, right?correct i tried both, same result

i guess the one difference between when it was working and now is that i'm not on my home wifi, i'm on mobile data with a hotspot, never really tried local development on hotspot wifi before
interesting... yeah, I'm setting here trying to figure out what would be different between
fetch()
and like curl's http impl to cause this
just to double check, can you try another project, to make sure no convex deployment is reachable this way?
I'm guessing none of them work, and this isn't isolated to this one
we have a theory herecould you actually expand the
curl
screenshot a bit? I'm curious to see what IPs it's finding / choosing to connect toi tried another project and it didn't work, i'll give it another go
yeah, this could be ipv4 vs. ipv6 issue
same issue on two other projects
looks like curl is using ipv6
and fetch() is using ipv4
why would it work up until a few hours ago then
can you try adding
--ip-family ipv4
to the network-test command?
hmm. best guess so far is something about the mobile hotspot doing something to your routing, but I'll check what the network test is trying to do
i'll wait for the wifi to get back on and report back
one thing you could test -- try turning off IPv6 briefly in your network settings?
at least on Mac, you can do this in the settings for your wifi network under TCP/IP by setting IPv6 to "link-local only"

I suspect your mobile hotspot is advertising IPv6 support, so your computer is trying to use that to talk to Convex...but the connections are failing, and it may be our fault that it's not falling back to IPv4 cleanly
found this, disabled and reconnected, network test still the same result

thanks for trying that!
one more thing to try:
npx --node-options '--dns-result-order=ipv4first' convex network-test
@devagr in short, especially if that command works, this is our suspicion: WSL doesn't support ipv6, but fetch() is preferring IPV6. curl -v is using ipv4. if you force node / bun to use IPV4 for fetch, then it will probably start working again. if that seems to fix the issue, there are environment variables you can set that make sure node (and probably bun?) always use IPv4 for fetch()
nop

if you provide that same
--node-options
to convex dev
, how about then?you may also want to try
NODE_OPTIONS='--dns-result-order=ipv4first' npx convex network-test
-- apparently some newer versions of node don't respect --node-options
and only use the environment variable versionwhy this changed: possible when you're tethering you're getting a public IPv6 address, and you normally don't have one
no change

man.
no worries i'm completely fine with waiting it out
yeah got back on regular wifi and the issue is gone