I’m getting a strange issue where preview deployments on a specific branch are immediately being canceled, then automatically redeployed, which ends up being successful. Once deployed, the deployment works fine.
An example of a canceled deployment: ID 9Xfz7ZajTDpX2HG8bV2QagASaivj
Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/***/*** (Branch: feature/***, Commit: b92a172)
Error: This deployment is no longer building, it was probably canceled and/or deleted
Cloning completed: 305.488ms
Found .vercelignore
Removed 13 ignored files defined in .vercelignore
Successful redeploy: ID GXByjCYWT6U1hjh6m6tA6tvxUEcW
Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/***/***(Branch: feature/***, Commit: b92a172)
Skipping build cache, deployment was triggered without cache.
Cloning completed: 1.026s
Found .vercelignore
Removed 13 ignored files defined in .vercelignore
Running "vercel build"
Vercel CLI 37.12.0
I don’t believe it’s related to Next 15, as I do have a successful deploy right after pushing the update. What I do suspect, is that I:
made a bad commit to the branch
canceled the deployment
deleted the branch on the remote
rebased on local to fix the bad commit
pushed again to the same branch
continued to push to this same branch
Everything is fine on local, branch in git looks fine. It’s just that the Vercel deploy error has no info so I’m unable to debug what the problem exactly is. I just tried branching off this “problem” branch and it still exhibited the same behavior. Branching off of main also did it, and that branch hasn’t been touched in 2 weeks and has been deploying fine.
Unfortunately didn’t work. I tried the CLI first, and got the “deployment has been canceled error” locally.
Submitting a new commit while the project has the env var set resulted in the same thing:
Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/***/*** (Branch: feature/***, Commit: 501a7c5)
VERCEL_FORCE_NO_BUILD_CACHE is set so skipping build cache step
Error: This deployment is no longer building, it was probably canceled and/or deleted
Cloning completed: 316.019ms
Found .vercelignore
Removed 13 ignored files defined in .vercelignore
canceled deploy ID: Gwgjix6HtZujtFKARagpfV55M6ea
building deploy ID: A8kYtjNgEPMkKrDW4NGQ25W6HNr3
Thanks for giving it a try. I did some digging to find what else might cause this behavior.
If this project uses the Neon integration, that seems to be the cause. It essentially steps in to cancel a deployment so it can set a unique env var before restarting the deployment. Please let me know if you start to see builds cancel and fail to automatically redeploy.
I do use Neon and it’s branching integration, however this hasn’t happened before, preview deployments have always just made a new branch perfectly fine.
When I go to project settings → Integrations → Neon Postgres → Configure, it appears as if it’s not been installed. When I click Configure, it sends me to the Vercel Marketplace where it’s prompting me to install the integrations.
Is there a chance that my integration has broken with the marketplace migration? I’ve had the Neon integration setup and working just fine for over 6 months now. If the automatic cancel and redeploy is intended, then that’s okay I guess, it’s just feels a bit strange when it worked fine before. Would be a little disappointing too since it’s breaking the whole “Active Branches” feature of preview deployments in the project dashboard.
Update: Logging into Neon, the Vercel integration looks fine on their end. The two test branches I made (off feature/***, and off main) both had branches made for them, so the integration does actually work, it’s just this weird (re)deploy thing going on.
Update #2: Merged my feature branch into main and deployed, and everything deployed fine without a cancelation. Might follow up with the Neon Discord if it is in fact Neon causing issues with preview deploys.
I’ll let you know if I find out anything new about it on the Vercel side. I’m not sure it’s expected in all scenarios, but it is normal for some situations. Hopefully this was just an edge case that the branch ran into and you don’t see it happen again