跳转到内容

07. Launch Checks and Common Errors

此内容尚不支持你的语言。

This chapter is for the final check before you call the system live, plus the most common deployment mistakes people hit on their first pass.

Before you call the deployment done, verify the basics one more time.

Check:

  • the public site opens normally
  • the admin opens normally
  • the correct domains are being used

Check:

  • login works
  • the admin can read real project data
  • obvious configuration pages are usable

Check:

  • signup or login works
  • critical pages are not empty
  • the product can read the current app_key data correctly

If you enabled them, also check:

  • payment flow
  • AI flow
  • blog flow
  • notifications
  • check-in

2. Common error 1: service binding target not found

Section titled “2. Common error 1: service binding target not found”
  • you renamed a Worker
  • not all required Workers were created first
  • you deployed using the wrong Cloudflare account
  • restore the expected Worker names
  • create every required Worker target
  • run wrangler whoami and verify you are in the intended account

3. Common error 2: D1, KV, or R2 resources cannot be found

Section titled “3. Common error 2: D1, KV, or R2 resources cannot be found”
  • resources were never created
  • config files still contain placeholders
  • resource IDs were copied incorrectly
  • verify the resources exist in Cloudflare
  • compare config values carefully
  • replace all placeholder values before redeploying

4. Common error 3: admin login returns 401

Section titled “4. Common error 3: admin login returns 401”
  • auth secrets are wrong
  • frontend points at the wrong auth URL
  • the domain configuration is inconsistent
  • verify auth secrets again
  • verify auth endpoints again
  • confirm the deployed frontend is using the latest environment values

5. Common error 4: pages open, but all data is empty

Section titled “5. Common error 4: pages open, but all data is empty”
  • the frontend points at the wrong backend
  • the wrong app_key is in use
  • the admin and frontend are not reading the same dataset
  • verify frontend environment variables
  • verify the real app_key
  • confirm the backend services and admin data belong to the same project

6. Common error 5: the payment page opens, but payment does not work

Section titled “6. Common error 5: the payment page opens, but payment does not work”
  • provider keys are missing
  • webhook config is incomplete
  • pricing or product data is not configured correctly
  • verify payment provider secrets
  • verify webhook configuration
  • verify product and pricing data in the admin

7. Common error 6: the AI page opens, but sending a message fails

Section titled “7. Common error 6: the AI page opens, but sending a message fails”
  • provider keys are missing
  • model config is incomplete
  • gateway or upstream settings are wrong
  • verify AI provider keys
  • verify model mapping
  • verify the deployed AI service is reading the intended environment values

8. Common error 7: Pages deploy says Invalid binding SESSION

Section titled “8. Common error 7: Pages deploy says Invalid binding SESSION”

This usually means the expected binding exists in code or config, but is not properly created or attached in the target environment.

  • verify the Cloudflare binding exists
  • verify the Pages environment is using the right binding name
  • redeploy after fixing the binding configuration

If something breaks, do not panic and do not rewrite half the setup at once.

Use the simplest debugging loop:

  1. identify one likely cause
  2. change one thing
  3. redeploy or retry
  4. observe the result

That is the fastest way to converge on a stable production setup.