Had an very bizarre issue today where it appeared like no code changes from a branch build and deploy were actually showing up in the deployed application. Everything from the Web UI perspective looked fine, buid was OK, logs were all OK, etc. I had a nice troubleshooting session with the Vercel support AI bot and it actually did an amazing job guiding me through the troubleshooting process. It even composed a nice summary of the event for me to post here. I thought I’d share it here along with a suggestion for a future enhancement of the Vercel Web UI which would have likely prevented a burnthrough of time while troubleshooting this.
Title: Feature Request: Warn about Environment Variables when Renaming Projects
Category: Feature Request
Post:
Hi Vercel team,
I’d like to suggest a feature enhancement based on an issue I encountered today (December 18, 2024) when renaming my project.
What happened:
-
Renamed project from
basecamp-67qutocruxapp -
All new deployments built successfully
-
However, I couldn’t see my code changes in the deployed app
-
Root cause: Environment variables containing auth redirect URLs still referenced the old project name (e.g.,
basecamp-67qu-git-main-myteam.vercel.app) -
After authentication, users were redirected back to old deployments under the previous project name
The Problem:
When you rename a project, environment variables like NEXT_PUBLIC_APP_URL, NEXTAUTH_URL, AUTH_REDIRECT_URI, or any custom variables containing Vercel URLs with the old project name aren’t automatically updated or flagged. This can cause silent failures that are difficult to debug.
Proposed Solutions:
-
Documentation Update: Add a warning/checklist to the project renaming documentation highlighting the need to review environment variables containing URLs
-
UI Enhancement: When renaming a project, scan environment variables for values containing the old project name and:
-
Show a warning list of potentially affected variables
-
Offer to automatically update them, or
-
At minimum, display a checklist reminder to review them
-
-
Build-time Warning: Detect when environment variables reference deployment URLs with mismatched project names
Impact:
This would prevent confusion and save significant debugging time for teams using authentication providers, webhooks, or any services that rely on callback URLs.
Would love to hear the Vercel team’s thoughts on this! Of course while it seems like dumb sysadmin 101 problem, the change in the deployment alias URL was so subtle it eluded my eyes completely. The good news it has prompted a larger change in the redirection and auth architecture so that in the future we won’t rely on hardcoded URLs in ENV vars. That is a different conversation entirely though. Thanks for reading if you made it this far!