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

# Platform Troubleshooting Guide

> Resolve common issues with domains, authentication, and API integration

# Platform Troubleshooting

Setting up a community can be complex. This guide helps you decode error messages and fix the most common issues without needing to wait for a support reply.

<Info>
  **Status Check**: Before troubleshooting, visit [status.nudj.cx](https://status.nudj.cx) to ensure the platform is operational.
</Info>

## Domain & DNS Issues

When setting up a [Custom Domain](/admin-guide/settings/domains), DNS is usually the culprit.

### DNS Error Decoder

If you use a tool like [dnschecker.org](https://dnschecker.org) and see errors, use this table to fix them:

| What you see                | What it means                       | The Fix                                                                            |
| :-------------------------- | :---------------------------------- | :--------------------------------------------------------------------------------- |
| `NXDOMAIN`                  | The domain doesn't exist.           | Check for typos in your subdomain (e.g., `commuity` vs `community`).               |
| `A Record` (numbers)        | You pointed to an IP address.       | Delete the A record. Nudj requires a **CNAME** pointing to `cname.vercel-dns.com`. |
| `Orange Cloud` (Cloudflare) | Your traffic is being proxied.      | Go to Cloudflare and click the orange cloud to make it **Gray** (DNS Only).        |
| `Old Value`                 | Your previous host is still active. | You need to wait up to 24 hours for "Propagation," or lower your TTL to 3600.      |

***

## Login & Authentication

If users are saying "I can't log in," follow this flowchart to find the cause:

### The "Can't Login" Flowchart

1. **Does the user see an "Invalid Subdomain" error?**
   * ✅ **Yes**: They are using the wrong URL. Ensure they are visiting `your-org.nudj.cx` or your custom domain.
   * ❌ **No**: Move to step 2.

2. **Does the "Magic Link" email never arrive?**
   * ✅ **Yes**: Check your [Email SMTP settings](/admin-guide/settings/email-configuration). If you haven't configured them, Nudj can't send the email.
   * ❌ **No**: Move to step 3.

3. **Does the Google/Microsoft login show "App not verified"?**
   * ✅ **Yes**: You haven't finished the [Provider Setup](/admin-guide/settings/standard-login-methods). You need to add Nudj's Redirect URI to your Google/Microsoft Developer console.
   * ❌ **No**: Move to step 4.

4. **Is the user getting a "403 Forbidden" after logging in?**
   * ✅ **Yes**: They are logged in, but they aren't a member of this specific community. Check your **User Access** settings.

***

## System Diagnostics & Logs

If the issues aren't related to setup, you can use our built-in diagnostic tools to find the root cause.

### 1. Run System Diagnostics

Go to **Control Room > Settings > Advanced Troubleshooting > Run Diagnostics**.
This 2-minute check verifies:

* Database connectivity.
* API responsiveness.
* Email delivery status (SMTP).
* Third-party integration health.

### 2. Activity Logs

Nudj maintains detailed logs to help you play detective:

* **User Activity**: When did User X complete Challenge Y?
* **Admin Logs**: Who changed the reward price?
* **API Logs**: (For Developers) See the raw requests and responses.
* **Webhook Delivery Logs**: (For Developers) See every webhook attempt — request body, response status, and a retry button for failed deliveries. See [Delivery Logs & Retries](/developer/webhooks/logs).

### 3. Debug Mode

Enable **Debug Mode** in the Troubleshooting settings for 24 hours to see extra-detailed error messages and performance metrics.

***

## API & Developer Errors

If you're building a custom integration, use these codes to debug your requests.

### Common API Error Codes

<AccordionGroup>
  <Accordion title="401 Unauthorized" icon="lock">
    * **Cause**: Your API token is missing, expired, or for the wrong organization.
    * **Fix**: Generate a new token in **Settings > API Configuration**. Ensure you're sending the header as `x-api-token: YOUR_TOKEN`.
  </Accordion>

  <Accordion title="403 Forbidden" icon="user-lock">
    * **Cause**: Your token doesn't have the required "Scope."
    * **Fix**: If you're trying to *create* a challenge, ensure your token has `admin` or `write` permissions, not just `read-only`.
  </Accordion>

  <Accordion title="404 Not Found" icon="magnifying-glass">
    * **Cause**: You are calling a resource ID that doesn't exist in your organization.
    * **Fix**: Double-check the Challenge ID or Reward ID in your URL.
  </Accordion>

  <Accordion title="429 Too Many Requests" icon="gauge">
    * **Cause**: You've hit our rate limits (usually 100 req/min for integrations).
    * **Fix**: Implement "Exponential Backoff" in your code to slow down your requests.
  </Accordion>
</AccordionGroup>

***

## Challenges & Rewards

### "Why didn't my challenge complete?"

If a user did the task but didn't get points:

1. **Check Action Logic**: Did you require them to answer a quiz *and* watch a video? They must do both.
2. **Verify URL (for Website Visits)**: For "Visit Website" actions, users must stay on the page for at least 5 seconds for the browser to register the completion.
3. **Check Expiry**: Has the challenge date passed?

### "A reward shows as Sold Out but I have inventory"

1. **Check Asset Count**: Go to the Reward editor. If you chose "Unique Codes," you must have codes uploaded in the **Assets** tab.
2. **Check User Limits**: Did you set "Limit 1 per user"? If the user already bought it, it will show as unavailable to them.

***

## Still Stuck?

If you've checked the above and still have issues:

**Email us at [support@nudj.cx](mailto:support@nudj.cx) with:**

1. Your Organization Subdomain.
2. The specific User ID or Challenge ID affected.
3. A screenshot of the error message.
4. (Developers) The `x-request-id` header from our API response. Every Nudj API response includes this header — we trace it directly to the exact request span in BetterStack.
