# Common Console Errors

> Understand frequent FiveM and Sky-Systems console errors and what they usually mean.

Console errors often look more complicated than they are. Start by finding the first error after the resource restart. Later errors are often only follow-up errors.

## Callback timeouts or actions that do not complete

If an anticheat has **Resource Protection** enabled, you **must whitelist every installed Sky resource**, including `sky_base`, `sky_jobs_base` and each Sky product. This applies to Electron and other anticheats. Resource Protection can block callback communication even when the resources start without errors. Follow [Anticheat Resource Protection](/docs/guide/anticheat-resource-protection), apply the provider's configuration and test the action again. Timeouts can also have other causes; collect both server and full client logs if the issue remains.

## Config Syntax Error

Example:

```text
SCRIPT ERROR: @sky_ambulancejob/config/config.lua:120: '}' expected near 'name'
```

This usually means the Lua config has a missing comma, missing bracket, or broken quote around the shown line.

What to do:

- Open the file and line from the error.
- Check the lines above it too.
- Compare the edited file with a fresh original config.
- Fix missing commas, quotes, or closing braces.

## Nil Config Tables

Example:

```text
attempt to index a nil value (field 'ToggleFeatures')
attempt to index a nil value (global 'Locales')
bad argument #1 to 'for iterator' (table expected, got nil)
```

This usually means an earlier config error stopped the config from loading. Required tables were never created, so other files fail afterward.

What to do:

- Scroll up to the first error from the same resource.
- Check the last config file you edited.
- Restore missing sections such as `Config.ToggleFeatures`.
- Do not only fix the final error shown in the console.

## No Such Export

Example:

```text
No such export GetPlayerData in resource sky_base
```

This usually means a dependency is not started, started too late, renamed, outdated, or the wrong resource is being called.

What to check:

- The dependency exists in `resources`.
- The dependency starts before the script using it.
- The resource folder was not renamed.
- You are using compatible script versions.

## Missing SQL Table

Example:

```text
Table 'database.ambulance_users' doesn't exist
```

This means automatic migration failed/was disabled, or the wrong SQL adapter or database is configured.

What to do:

- Read the first migration error above the missing-table message.
- Check the SQL resource, selected adapter and database name.
- With `Config.AutoExecuteQuery = true`, fix that error and restart so the resource can create/migrate its tables.
- If automatic queries are intentionally disabled, import the resource's matching current `import.sql` once and restart.
- For updates, read the changelog for explicit migration requirements.

## Entitlement Or Protected Resource Error

Example:

```text
You lack the required entitlement to use sky_ambulancejob
Failed to verify protected resource
```

What to check:

- The server license key belongs to the same CFX Portal account that owns the resource.
- The resource folder contains the `.fxap` file.
- The resource was uploaded completely.
- The resource folder was not renamed.
- Try downloading and uploading the resource again.

## NUI Or UI Errors

Example:

```text
Failed to fetch NUI callback
Cannot read properties of undefined
```

These usually appear in the client `F8` console.

What to check:

- Open `F8` and send the real client error.
- Check the server console for callback errors.
- All files from the downloaded resource were uploaded, including its included UI.
- `source/html/index.html` and assets exist.
- No client-side error appears before the UI opens.
- The resource name was not changed.
- Do not edit built UI files in `source/html/`.

## Callback Errors

Example:

```text
ServerCallback "sky_mechanicjob:partsDelivery:getReadyDeliveries" ran into the following error
```

The callback name is where the error happened, but the real cause is usually inside the lines after it. It can be a config error, SQL error, missing dependency, or missing table.

When reporting callback errors, send the full block, not only the callback name.
