> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scriptonia.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common issues, error messages, what to do, and how to get help.

## Quick Index by Stage

| Stage                 | See                                                 |
| :-------------------- | :-------------------------------------------------- |
| **Idea**              | Idea & Intent                                       |
| **Intent**            | Idea & Intent                                       |
| **Platform**          | Platform                                            |
| **Payment**           | Payment (Solana), Payment (Dodo), Payment (General) |
| **Execution**         | Execution                                           |
| **Download & GitHub** | Download & GitHub                                   |
| **Setup & config**    | Setup & configuration                               |

***

## Common Issues

***

### Idea & Intent

| Issue                                                                               | What’s going on                                                               |
| :---------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
| Idea returns no analysis or questions                                               | AI key missing or wrong; model/env misconfigured; or API/network error        |
| “Idea is required”                                                                  | Idea field was empty or not sent                                              |
| Stuck on Intent; no refined requirements                                            | Answers not sent, `sessionId` missing, or workflow/idea not found             |
| “Workflow context not found” / “Idea is required. Please start from the idea stage” | Wrong or expired `sessionId`; DB/store lost the workflow; or you skipped Idea |
| “Answers are required”                                                              | No answers array or all empty                                                 |

***

### Platform

| Issue                                                                     | What’s going on                                                       |
| :------------------------------------------------------------------------ | :-------------------------------------------------------------------- |
| No platform options on `/platform`                                        | Intent not completed; `/api/platform` or refined requirements missing |
| “Workflow session not found. Please start from the beginning”             | `sessionId` unknown or workflow never created                         |
| “Refined requirements not found. Please complete the intent stage first.” | Intent step not done or not saved                                     |
| “Workflow context not found” / “Failed to save platform selection”        | DB or in-memory update failed                                         |
| “Selected platform is required”                                           | Platform not chosen or not sent                                       |

***

### Payment (Solana)

| Issue                               | What’s going on                                |
| :---------------------------------- | :--------------------------------------------- |
| Insufficient funds                  | Not enough SOL or \$SCRIPT for transfer + fees |
| Use wallet connect button in header | Wallet not connected                           |
| Balance fetch timed out / RPC error | RPC misconfigured or down                      |
| Wrong network                       | Wallet and app network mismatch                |
| Wallet doesn’t open                 | Wallet locked or blocked                       |
| Invalid agent address               | `TREASURY_WALLET` missing or invalid           |
| Tx succeeds but workflow fails      | On-chain OK; DB update failed                  |

***

### Payment (Dodo)

| Issue                             | What’s going on                     |
| :-------------------------------- | :---------------------------------- |
| Failed to create checkout session | Dodo API key or product setup wrong |
| Redirect fails                    | Redirect blocked or URL issue       |
| Verifying payment stuck           | Confirm-payment failing             |
| Verification failed               | Workflow update failed              |
| Paid but Execution blocked        | Webhook or confirm-payment failed   |

***

### Payment (General)

| Issue                      | What’s going on                       |
| :------------------------- | :------------------------------------ |
| No Active Session          | `/payment` opened without `sessionId` |
| Workflow context not found | Platform not completed                |
| Wallet public key required | Solana payment missing wallet key     |
| Payment ok, redirect fails | Workflow not updated                  |

***

### Execution

| Issue                          | What’s going on              |
| :----------------------------- | :--------------------------- |
| Workflow context not found     | Platform/payment not saved   |
| Selected platform required     | Platform missing             |
| Refined requirements not found | Intent not completed         |
| Invalid transaction signature  | Solana verification failed   |
| Agents disabled by admin       | Agents turned off            |
| Execution never finishes       | API/AI slow or failing       |
| Review failed / no ZIP         | ReviewAgent blocked delivery |

***

### Download & GitHub

| Issue                       | What’s going on              |
| :-------------------------- | :--------------------------- |
| Project not found           | Generate not run             |
| Project directory empty     | Files not written            |
| Failed to download ZIP      | Server or network error      |
| GitHub not connected        | OAuth not completed          |
| Project files not found     | Server path mismatch         |
| No files to upload          | Empty project directory      |
| Failed to create repository | Repo exists or missing scope |
| GitHub OAuth not configured | OAuth env vars missing       |

***

### Setup & configuration

| Issue              | What’s going on                    |
| :----------------- | :--------------------------------- |
| DB errors          | Wrong `DATABASE_URL` or migrations |
| No AI reply        | AI keys missing or invalid         |
| Build fails        | Prisma or Node issues              |
| Payment/RPC broken | Env vars missing                   |

***

## Error Messages

***

### By message (or pattern)

| Message                        | Where                    | Cause                 |
| :----------------------------- | :----------------------- | :-------------------- |
| Idea is required               | `/api/idea`              | Missing idea          |
| Session ID is required         | APIs                     | Missing `sessionId`   |
| Answers are required           | `/api/intent`            | Empty answers         |
| Workflow context not found     | Multiple                 | Invalid session       |
| Refined requirements not found | `/api/platform`          | Intent not saved      |
| Selected platform is required  | platform/payment         | Platform missing      |
| Wallet public key required     | `/api/payment`           | Solana wallet missing |
| Invalid transaction signature  | `/api/execute`           | Tx verify failed      |
| Agents disabled by admin       | `/api/execute`           | Agents off            |
| Execution result not found     | `/api/projects/generate` | Execute not run       |
| Project not found              | `/api/projects/download` | ZIP missing           |
| GitHub not connected           | `/api/github/upload`     | OAuth missing         |
| Payment service config error   | Dodo                     | API key missing       |
| GitHub OAuth not configured    | OAuth                    | Env missing           |

***

### HTTP status codes

| Code | Meaning             |
| :--- | :------------------ |
| 400  | Bad request         |
| 401  | Unauthorized        |
| 404  | Not found           |
| 405  | Method not allowed  |
| 500  | Server error        |
| 503  | Service unavailable |

***

## Solutions

***

### Idea & Intent

* Check AI keys and model
* Restart from Idea if session lost
* Ensure answers array is complete

***

### Platform

* Complete Intent first
* Retry platform selection
* Restart from Idea if session expired

***

### Payment (Solana)

* Add funds
* Match network
* Connect wallet via header
* Contact support with tx signature if DB update failed

***

### Payment (Dodo)

* Verify Dodo config
* Ensure success URL has `sessionId` and `platform`
* Contact support with receipt if verification fails

***

### Execution

* Ensure Intent and Platform saved
* Use correct redirect URL
* Contact support if agents disabled or execution hangs

***

### Download & GitHub

* Ensure Review passed and ZIP generated
* Connect GitHub before upload
* Retry or contact support if files missing

***

### Setup & configuration

* Verify `DATABASE_URL` and migrations
* Set AI keys and model
* Run prisma generate and build again

***

## Getting Help

***

### What to include

* `sessionId`
* Stage
* Steps taken
* Exact error
* Proof of payment (if any)

***

### Support tickets

Create via `POST /api/support/tickets` with:

* `sessionId`
* `message`
* `userWallet` (optional)
* `priority` (optional)

***

### Contact

* [**scriptonia.xyz**](http://scriptonia.xyz)
* Docs: Overview, Installation, Workflow Guide, Payment Guide, Execution Process, Project Delivery

***

### Finding your sessionId

* In the URL
* On Execution page
* Payment success page
* Local storage (if used)
