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

# Troubleshooting

> Actionable steps for resolving common development challenges.

## Stuck in “Try to Fix”

Building with Lumi is designed to be fast and intuitive, but like any powerful tool, it can sometimes encounter issues. You might find your code doesn't run as intended, or the AI misinterprets your instructions, leading to unexpected behavior.

Here’s a step-by-step guide to help you resolve these problems and get back to building:

<Steps>
  <Step title="Use the 'Try to Fix' Button First">
    When an error appears, your first step should be to click the "Try to Fix" button. Lumi will analyze the logs, identify the problem, and apply a quick fix. If this doesn't resolve the issue, it’s time to move on to the next step.
  </Step>

  <Step title="Diagnose Unexpected Behavior">
    Sometimes your code runs without errors but doesn't function as intended. This is known as unexpected behavior and can be tricky to debug. Here's how to approach it:

    * **Review Your Prompt:** Double-check your original instructions to ensure they were clear.
    * **Isolate the Issue:** Examine individual components and logic to pinpoint where things went wrong.
    * **Provide Visual Context:** Use screenshots or recordings to show the AI exactly what isn't working.
  </Step>

  <Step title="Write More Effective Prompts">
    Clear and structured prompts produce better outcomes. Follow this format for best results:

    * **Project Overview:** Briefly describe what you are building.
    * **Page Structure:** List the key pages and components.
    * **Navigation Logic:** Explain the intended user flow.
    * **Visual Aids:** Upload wireframes or mockups.
    * **Implementation Steps:** Outline the desired build order.
  </Step>

  <Step title="Build in a Logical Order">
    A structured approach to development prevents many common issues. Follow this recommended workflow:

    1. Create the main layout and pages.
    2. Connect your backend or database.
    3. Set up user authentication and roles.
    4. Plan the logic for each feature.
    5. Prompt Lumi to implement features one by one.
  </Step>

  <Step title="Use Discuss Mode for Guidance">
    If you're feeling stuck, switch to Discuss Mode for assistance:

    * Ask Lumi to analyze the current state of your project.
    * Request a summary of the solutions already attempted.
    * Prompt for new strategies to tackle persistent problems.
  </Step>

  <Step title="Apply Advanced Tactics for Tough Bugs">
    If the issue persists, try these more advanced techniques:

    * **Be Specific:** Clearly describe the bug and what you expect to happen.
    * **Use Visuals:** Screenshots or screen recordings are incredibly helpful for illustrating complex problems.
    * **Ask for Alternatives:** Directly ask, "What else can we try?" to generate new ideas.
    * **Roll Back:** Restore your project to a previously working version and rebuild the problematic feature step-by-step.
  </Step>
</Steps>

## **Stripe and Other Third-Party Integrations in Remixed/Forked Projects**

Remix and Fork are designed to create a complete copy of a project’s code, environment variables, database structure, and other information. For projects integrated with third-party platforms like Stripe, we cannot create new third-party account projects on the user’s behalf. Attempting to do so may result in data configuration conflicts between the original project and the forked or remixed project. Therefore, users must perform manual changes themselves.

* If a user has integrated third-party platforms like Stripe in the original project, they need to prompt Lumi to update the Secret Key and reconfigure products, webhooks, etc., in the forked and remixed projects.
* For integrations with general third-party services, users should prompt Lumi to update the relevant keys in the forked and remixed projects.

## **Common Troubleshooting Areas**

Most issues you'll encounter will fall into one of the following categories:

* UI and Layout Glitches
* API or Backend Errors
* Prompt Misinterpretations
* AI Unresponsiveness or Malfunctions
* Platform or Integration Failures

Expand the sections below to identify specific symptoms and find actionable solutions for each.

### General issue

<Accordion title="How can I get a fast diagnosis for a problem?">
  Switch to Chat Mode and ask: “Something isn’t working correctly. Can you explain the problem and tell me what you’ve already tried?”
</Accordion>

<Accordion title="What should I do for UI or layout problems?">
  * Inspect the component hierarchy and review the applied styles.
  * Use screenshots to clearly illustrate any visual glitches.
  * Prompt Lumi directly: “This element is misaligned. Please fix it.”
</Accordion>

<Accordion title="What if I'm completely stuck on an error?">
  * Try this prompt: “Let's take a step back. Analyze the error and propose an alternative solution.”
  * Break the task down into smaller, more manageable steps.
  * If errors persist, use the revert button to roll back to a working version.
</Accordion>

<Accordion title="What does a 'code sandbox error' mean?">
  This indicates a platform problem and should not happen. Please report it immediately to our support team.
</Accordion>

<Accordion title="What should I do if I see a 'Not found preview' or 'spinning up sandbox' message?">
  First, try a hard browser refresh. If the issue is not resolved, please contact support for assistance.
</Accordion>

### AI Reliability

<Accordion title="How can I avoid AI mistakes when prompt engineering?">
  * Write clear, well-structured prompts.
  * Employ reverse meta prompting techniques.
  * Test prompts in Discuss Mode before implementing major changes.
</Accordion>

<Accordion title="What should I do if the AI is not responding?">
  This is an unexpected issue. Please report it to our support team for immediate assistance.
</Accordion>

<Accordion title="How can I break a persistent fix error loop?">
  Refine your prompt to clarify your objective, or request a step-by-step debugging guide from the AI.
</Accordion>

<Accordion title="What should I do if a refactor causes major issues?">
  Implement changes incrementally. If problems continue, revert to a stable version or use Discuss Mode for debugging.
</Accordion>

<Accordion title="What if the AI enters an error loop, hallucinates, or uses broken logic?">
  If you encounter error loops or flawed logic, revert to a stable version. Then, provide more specific context in your next prompt, using the visual editor or by attaching a knowledge file.
</Accordion>

<Accordion title="What can I do if the AI fails to implement my requested changes?">
  The AI may be misinterpreting your request or targeting the wrong files. Provide highly specific instructions, or make the edits manually.
</Accordion>

<Accordion title="What if Discuss Mode or Agent Mode isn't responding or gives an incomplete answer?">
  This is an unexpected issue. Please report it to our support team for immediate assistance.
</Accordion>

<Accordion title="What should I do about unexpected crashes, errors, or loops?">
  * Avoid retrying the exact same prompt; instead, simplify or rephrase it.
  * Ask the AI: “What solutions have we already attempted?”
  * Restore a previous working version of your project.
</Accordion>
