Bad URL errors "WebSocket closed unexpectedly with code 1006" in vercel preview env + convex dev
My local environment is just fine (this time), the problem has only occurred to the preview env in vercel, it has persisted for hours.
I believe this is a real problem and needs to be resolved. I've reported similar issues for quite a few times. I can send you the vercel preview link for investigation. I love how easy it is to use convex but this is really pulling me off.
11 Replies
now it just got loading and loading... and most importantly it is been hours already
Sorry this has been such a pain to debug. Let's try a few more things to get to the bottom of this:
1. Can you DM me preview link? I'd like to see if this happens for me too.
2. This happens in multiple browsers (Chrome and Firefox), correct?
3. What kind of network are you on? Is this home wifi? Is there a firewall?
4. Does this happen on different devices on the same network? Does it persist on a different network (ex your phone on data)?
5. What does this WebSocket connectivity test page show? https://connectivity-test.asana.com/
At my previous company (Asana) we had some major issues with a small number users who had networks that blocked WebSockets. We made that test page to help debug problems.
1. I sent you the preview link
2. Yes it happens in both chrome and firefox
3. I am on home Wifi with VPN so that might be a problem, but convex dashboard works perfect for me, so I guess this is specific to deployment maybe?
4. It happens to my colleagues as well, so yes, multiple devices
5. see the screen shot
Thank you Alex! 🙏
@whoami could you share the URL you're using? it looks like
clean-dinosaur-909.convex
when it should look more like clean-dinsaour-909.convex.cloud
ah
seems like my colleague changed that (the url for storage is just one word different from it and we wanted to consolidate them) without deploying a new version 😂
I am facing the same issue here .
What is the process to resolve this , I am unable to debug?
This usually means your CONVEX_URL or NEXT_PUBLIC_CONVEX_URL or similar is wrong. In the network tab, what is the url of these failed requests?
What should we keep in NEXT_PUBLIC_CONVEX_URL?
Request URL:
wss://happy-otter-123.convex.cloud/api/1.10.0/sync
I am getting this in network tab
"happy-otter-123" is not a real URL, that sounds like something copied from an example. Your actual URL will look similar, you can find it in the Convex dashboard in deployment settings. In your .env.local there should also be a URL put there by the Convex CLI.
https://wandering-raccoon-83.convex.cloud this link??
Where should we put this link ?
NEXT_PUBLIC_CONVEX_URL