Troubleshooting and FAQ
Your app is built, it is on GitHub, and Vercel has given you a link. If any part of that did not go smoothly, this page is where you find out why.
You are not doing it wrong
Every problem on this page is a normal one with a specific cause and a specific fix. None of them mean you have broken anything, and none of them can damage the app you built. Find the symptom that matches yours and work through it.
The most common problem: your app uses AI, and the live version does not
If your app asks an AI to do something while a student is using it โ generating feedback, marking a written answer, producing an image โ it works perfectly in AI Studio and then does nothing once it is live on Vercel. That is not a mistake you made. It is the expected behaviour, and the reason is worth understanding.
Why it happens
An app that calls Google's AI needs a key โ a long password that tells Google which account the request belongs to. While you build inside AI Studio, Google quietly supplies one for you, so you never see it.
When you sync your project to GitHub, that key is deliberately left behind. This is a good thing: keys should never be sitting in a code repository. But it means your live app arrives on Vercel with no key, and its AI features have nothing to call. You usually see a blank space where the AI result should appear, or a message mentioning an API key.
Read this before you add a key
Adding your own key changes who pays. Inside AI Studio, Google covers the AI calls. Once your app is live with your key in it, every request your students make runs on your account and is billed to you. Free allowances exist, but they are limited, Google changes them, and a class working through an assignment can move through one quickly.
So the first question is not "how do I add a key?" It is "does this app actually need AI while students are using it?"
- If no โ a quiz, a calculator, a flashcard drill, a sorting exercise โ you do not need a key, and you should not add one. The AI wrote the code; the finished app just runs it. Skip this whole section.
- If yes โ the AI feature is the point of the tool โ then continue, and go in knowing you are turning on a meter.
There is a middle option worth considering: ask AI Studio to rebuild the feature without a live AI call. A set of pre-written feedback messages, or a fixed bank of questions, often teaches the same thing at no cost and with nothing to maintain.
If your app does need AI: adding the key
- Find out what your app calls the key. In AI Studio, ask: "What environment variable does this project read the Gemini API key from? Just tell me the name." It is usually
GEMINI_API_KEY, but check rather than assume โ the name has to match exactly, capital letters included. - Create a key at aistudio.google.com/apikey. Copy it somewhere safe. Google will not show it to you again.
- In Vercel, open your project, then Settings โ Environment Variables.
- Add a variable using the exact name from step 1, with your key as the value. Save it.
- Go to the Deployments tab and redeploy the most recent deployment. Adding a variable does not update a site that is already running โ it has to be rebuilt.
Part 5 of this course covers keys, environment variables, and the safe way to use them properly. This is the short version to get you unstuck.
One thing to check while you are there
A key is only hidden if the part of your app that reads it runs on the hosting service โ not in your students' browsers. Anything the browser reads, the visitor can read too, and that includes a key.
Ask AI Studio, with your project open:
If the answer is "from the browser", the feature will work โ but treat that key as spendable by anyone who visits. Set a spending limit, keep the app link to people you trust, and replace the key when you are done. Moving the call to the server is the real fix, and it is exactly what Part 5 walks through.
Three rules for a key, from now on
- Treat it like a password. Never paste it into your code, into a message to AI Studio, into a screenshot, or anywhere that reaches GitHub.
- Set a spending limit and a usage alert in your Google account before you share the app widely. A public link with an AI feature behind it is a bill waiting to be run up.
- If you think a key has been seen by anyone else, delete it at aistudio.google.com/apikey and create a new one โ first, before anything else. That takes a minute and settles the problem completely. Part 5 covers the full version in What to do if a key leaks.
Other problems
Problem: your repository does not appear in Vercel's list
Problem: the Vercel build failed
Problem: the deploy succeeded, but the page is blank
Problem: you changed the app, but the live site looks the same
Problem: AI Studio changed something you did not ask it to
Questions people ask at this point
Is any of this going to cost me money?
Not for what Part 1 builds. AI Studio, GitHub, and Vercel all have free tiers that comfortably cover a classroom tool. The one thing that costs money is an app that calls AI while students use it โ see the top of this page.
Can anyone find my app?
Your Vercel address is public to anyone who has the link, but it is not listed or advertised anywhere. In practice only the people you send it to will see it. If your app collects anything from students, that is a different conversation โ check with your institution before you share it.
Can I take it down?
Yes, at any time. Delete the project in Vercel and the link stops working. Your code stays on GitHub, so nothing is lost and you can redeploy later.
Can I put it on my own web address?
Yes โ the domain setup guide walks you from a .vercel.app address to something like mytool.myuniversity.ca.
Do I have to keep using AI Studio to make changes?
For now, yes, and it works fine. Part 3 shows you how to bring the project onto your own computer and edit it with an AI coding assistant, which is a far better experience once your app grows.
Still stuck?
Describe the situation to ChatGPT, Claude, or AI Studio itself. Specifics get you a useful answer far faster than "it does not work":
"I built a web app in Google AI Studio, synced it to GitHub, and deployed it on Vercel. Here is what I did: [your steps]. Here is what I am seeing: [exactly what appears on screen, including any error text]. What should I check next?"
One thing to leave out: never paste an API key into a chat message, a screenshot, or a support request.