Hey all, I am using `vitest-pool-

Hey all, I am using vitest-pool-workers to test my app in Github Action, and running into the following error with VectorizeIndex.query():
workerd/io/worker.c++:2169: info: uncaught exception; source = Uncaught (in promise); stack = Error: VECTOR_QUERY_ERROR: Status + 500
at VectorizeIndexImpl._send (cloudflare-internal:vectorize-api:185:23)
at VectorizeIndexImpl.queryImplV2 (cloudflare-internal:vectorize-api:205:21)
at VectorizeIndexImpl.query (cloudflare-internal:vectorize-api:45:20)
workerd/io/worker.c++:2169: info: uncaught exception; source = Uncaught (in promise); stack = Error: VECTOR_QUERY_ERROR: Status + 500
at VectorizeIndexImpl._send (cloudflare-internal:vectorize-api:185:23)
at VectorizeIndexImpl.queryImplV2 (cloudflare-internal:vectorize-api:205:21)
at VectorizeIndexImpl.query (cloudflare-internal:vectorize-api:45:20)
It works when testing locally locally but fails in the Github Action environment. Has anyone else ran into this issue? Thanks in advance! Please tell me if I should provide any more details
4 Replies
garvitg
garvitg2mo ago
Hey @zhichenguo. Could you please share some details about your Cloudflare account and Vectorize index over DM. I can look into specific errors associated with your account.
zhichenguo
zhichenguoOP2mo ago
Thanks so much @garvitg! Is it ok if I private message you?
garvitg
garvitg2mo ago
Yes please
zhichenguo
zhichenguoOP5w ago
We resolved it. The cause of the issue was that the Github Action environment is not logged in to Cloudflare, so it cannot access the real bindings. You can reproduce this locally by logging out of cloudflare (wrangler logout), then run the tests and click "deny" when the Cloudflare Oauth screen pops up in the browser To run vitest-pool-workers tests in the Github Action, add the CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables to the Action Thanks @garvit!

Did you find this page helpful?