ConvexTestingHelper causes all web sockets to fail with InternalServerError
Since I can’t use convex-test to connect to a remote backend I have used ConvexTestingHelper. However any time I use ConvexTestingHelper is fails with “WebSocket closed with code 1011: InternalServerError”.
6 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!
It seems this only happens if I use “withIdentity”
Ok… it looks like I can’t run tests against a hosted convex env, only a self-hosted one. It seems the admin key is required by this function and I can only get an admin key for the self hosted version of convex.
Does this mean there’s absolutely no way to test against a real environment?
Hmm the deploy key should work as an admin key but it doesn’t
I think this is a bug
Thanks but no that one doesn’t work.
What does work is calling a function in the dashboard, opening Dev Tools and looking at the web socket messages, there is an Admin Token that is sent - this one works
This token for me is 56 characters including an equal symbol on the end
Gotcha. I think it's stored somewhere on your machine as well after you authenticate with the cli
Ah yes that one works too! It’s different to the dashboard one but still works