Vercel Queues sendMessage returns 404 DEPLOYMENT_NOT_FOUND during local development

Problem

I’m trying to use Vercel Queues for some inter-service communication, and I’m getting stuck on the first step - sending a message to a queue. I’m trying to get this all working on local development.

Current Behavior

When I call send, I can trace through the code until it gets to ApiClient.sendMessage. In there it’s trying to POST to the URL:

https://dev1.vercel-queue.com/api/v3/topic/[my-topic-name]

and the HTTP response it gets back is 404.

Error:

The deployment could not be found on Vercel.
DEPLOYMENT_NOT_FOUND
sfo1::bslgc-1775756145614-4392df30c2e8

The project is linked to a Vercel project, but again this is trying to test local, un-deployed code.

What am I missing?

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

It may be an authentication issue. Please make sure you have the Vercel CLI installed (npm i -g vercel) and try running these commands:

  • Run vercel login to sign in to your Vercel account
  • Run vercel link to connect your local project to your Vercel project
  • Run vercel env pull to download the authentication credentials

That’ll create a .env.local file with OIDC tokens the SDK needs

It’s already linked to the vercel project (I can see it in .vercel/project.json)

I had previously run vercel env pull, but I just re-ran it to refresh my OIDC token. It didn’t fix the problem.

One follow up question - are queues/topics somehow scoped to an app/project? The documentation about topics and deployments is confusing me here. My goal is for one project (a back end Vercel function service) to send messages and a different project (a Next.js web app) to receive them. Is that a supported modality?

Here’s another data point

As a way of testing the message queue processing response, I wrote a little test CLI script in the receiving app that simulates the service’s behavior by posting a message to the queue. To my surprise, it worked! The message sent successfully. After tracing through the Vercel code on both projects, I realized that in the service (running under “vercel dev”) it’s using the “dev1” domain root (the dev1 region, i guess). That fails. On the application side it’s using the iad1 region. That posts the message successfully.

As another quick test, I curl’d https://dev1.vercel-queue.com/ . That returns DEPLOYMENT_NOT_FOUND. But when I curl https://iad1.vercel-queue.com/, I get a “redirecting” response. Maybe the dev infrastructure for the vercel queue stuff isn’t provisioned correctly?