Troubleshooting
Common issues and their solutions when deploying Pixelflare.
Terraform Issues
Authentication Failed
Error: Error: failed to fetch account: ...
Solution:
- Verify your
CLOUDFLARE_API_TOKENhas the correct permissions - Ensure your
CLOUDFLARE_ACCOUNT_IDis correct - Check token hasn't expired
Resource Already Exists
Error: Error: resource already exists
Solution:
bash
terraform import <resource_type>.<name> <id>Worker Deployment
Wrangler Command Not Found
Solution:
bash
pnpm install -g wrangler
# or
npx wranglerInvalid Configuration
Check your wrangler.toml was generated correctly:
bash
cat packages/api/wrangler.production.tomlAccess & Authentication
Unable to Login
Symptom: Redirects to login repeatedly
Possible causes:
- GitHub OAuth callback URL incorrect
- Access policy too restrictive
CF_ACCESS_AUDmismatch
Solution:
bash
# Verify callback URL
terraform output github_callback_url
# Check Access audience
terraform output cf_access_aud403 Forbidden
Check Cloudflare Access rules allow your email/domain.
Runtime Issues
Images Not Loading
- Check R2 bucket has images
- Verify custom domain is configured
- Check Worker logs:
wrangler tail
Upload Failing
Error: "Invalid upload token"
Solution:
bash
# Verify secrets are set
wrangler secret list
# Reset upload token secret
openssl rand -hex 32 | wrangler secret put UPLOAD_TOKEN_SECRETDatabase Issues
Migrations Not Applied
bash
# Check migration status
wrangler d1 migrations list pixflare-db-production
# Apply migrations
wrangler d1 migrations apply pixflare-db-productionGetting Help
Still stuck?
- Check GitHub Issues
- Search Discussions
- Open a new issue with details about your problem