> For the complete documentation index, see [llms.txt](https://complete-scripts.gitbook.io/complete-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-carradio/common-errors.md).

# Common errors

Check common issues to prevent contacting support

> *If your error is not here and it has a simple solution, you can comment it so that we can add it.*

{% hint style="info" %} <mark style="color:blue;">**Before opening a ticket, set**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**`Config.Debug = true`**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**in**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**`config.lua`**</mark><mark style="color:blue;">**, restart**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**`complete_carplay`**</mark><mark style="color:blue;">**, reproduce the problem and copy the errors from F8 and from the server console. Set it back to**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**`false`**</mark><mark style="color:blue;">**&#x20;**</mark><mark style="color:blue;">**afterwards.**</mark>
{% endhint %}

## Start-up and installation

{% hint style="danger" %} <mark style="color:red;">**You lack the required entitlement to use complete\_carplay**</mark>
{% endhint %}

The server license key does not belong to the Cfx.re account that owns the asset. Use a license key created on the same account that bought the Car Radio, or transfer the asset to the server account from the Cfx.re Portal (Keymaster), then restart the server.

{% hint style="danger" %} <mark style="color:red;">**Nothing happens: no error, the command does nothing or the resource does not load**</mark>
{% endhint %}

* The folder must be named exactly `complete_carplay` (and `complete_carplay_prop`). Folders like `complete_carplay-main` or `complete_carplay (1)` break the internal events.
* Check the `ensure` order in [Installation](/complete-scripts/scripts/complete-carradio/installation.md#correct-asset-placement): oxmysql, ox\_lib, framework, inventory, phone and sound player must start **before** `complete_carplay`.
* The open command and key work only while sitting in a vehicle.
* Still nothing? Turn on `Config.Debug` and read F8 and the server console.

{% hint style="danger" %} <mark style="color:red;">**"This vehicle is not registered" or the Car Radio opens in restricted mode**</mark>
{% endhint %}

This is by design. Car Radio saves its data (installation, screen position, playlists, favourites) per **owned vehicle**, so the plate must exist in your owned vehicles table (`owned_vehicles` on ESX, `player_vehicles` on QBCore / Qbox). Admin-spawned, NPC, rented or `/car` vehicles are not in that table:

* they cannot be installed ("This vehicle is not registered");
* with `Config.CarplayOnCarNotBought = true` they open in restricted mode (music, map and commands work, nothing is saved, no contacts);
* with `Config.CarplayOnCarNotBought = false` they show "Carplay is not installed in this vehicle".

To test, buy a vehicle from the dealership (or add it to the owned vehicles table) and install it there. If you use fake plates, the plate on the vehicle must match the plate saved in the database. If your garage or vehicle shop stores vehicles in another table, change the queries in `framework/<your framework>/server.lua` ([Framework functions](/complete-scripts/scripts/complete-carradio/exports.md#framework-functions)).

{% hint style="danger" %} <mark style="color:red;">**"Carplay is not installed in this vehicle" on an owned vehicle**</mark>
{% endhint %}

With `Config.RequireInstallation = true` every vehicle must be installed first: sit in it and use the `carplay` item or `/carplay-install`. If you want every owned vehicle to have a Car Radio without installing it (no screen prop), set `Config.RequireInstallation = false`.

{% hint style="danger" %} <mark style="color:red;">**"You are not a mechanic" or "You don't have a carplay item"**</mark>
{% endhint %}

* With `Config.RequireMechanic = true` only the jobs in `Config.MechanicJobName` can install and uninstall. Add your job names, or set it to `false`.
* "You don't have a carplay item": the `carplay` item is missing from the inventory or is not defined in your inventory. Add it as shown in [Item Configuration](/complete-scripts/scripts/complete-carradio/installation.md#item-configuration) and restart.

{% hint style="danger" %} <mark style="color:red;">**Using the item does nothing / "attempt to index a nil value" when using the item**</mark>
{% endhint %}

The `carplay` item is not registered in your inventory, or your inventory does not run the framework usable-item handler.

* Add the item definition to your inventory ([Item Configuration](/complete-scripts/scripts/complete-carradio/installation.md#item-configuration)). The name must be exactly `carplay`.
* With an inventory that has its own usable-item system, trigger `complete_carplay:client:InstallCarplay` from it ([Events](/complete-scripts/scripts/complete-carradio/exports.md#events)).
* Make sure you use the latest `framework/` files from the download: after an update, replace them instead of keeping old copies.

## Database

{% hint style="danger" %} <mark style="color:red;">**SQL Error: Table 'complete\_carplay' doesn't exist / Unknown column 'carplayid'**</mark>
{% endhint %}

The SQL file was not imported, or it was imported into another database. Import the file of your framework from `complete_carplay/database/` into the database your server uses ([Database Configuration](/complete-scripts/scripts/complete-carradio/installation.md#database-configuration)) and restart.

This is also the cause when **favourites and playlists are not saved**.

{% hint style="danger" %} <mark style="color:red;">**SQL Error: Table 'owned\_vehicles' / 'player\_vehicles' doesn't exist**</mark>
{% endhint %}

Your server has no owned vehicles table from the ESX / QBCore vehicle shop. Install your framework's vehicle shop, or adapt the queries in `framework/<your framework>/server.lua` to your own table.

<figure><img src="https://475587865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpMBpbOt8QgCXcjPYNji0%2Fuploads%2FHH4Xcqy8QMh689lvdUpk%2Fimage.png?alt=media&amp;token=25b75dc6-1241-4673-9035-487f53a11f81" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %} <mark style="color:red;">**SQL Error: Table 'complete\_carplay' already exists / Duplicate column name 'carplayid'**</mark>
{% endhint %}

The table and column are left over from an older version (usually v2). Delete the `complete_carplay` table and the `carplayid` column of `owned_vehicles` / `player_vehicles`, then import the SQL file again. Updating between v3 versions needs no database change.

## Music and audio

{% hint style="danger" %} <mark style="color:red;">**The music app has no songs / players cannot paste links any more**</mark>
{% endhint %}

Since version 3.3 the music app plays only the tracks you add to `Config.MusicLibrary` in `config.lua`. If the library is empty, the server console prints `Config.MusicLibrary is empty`. Follow [Music library](/complete-scripts/scripts/complete-carradio/music-library.md) to add your songs, then restart and check the console: it prints how many tracks were loaded and names every skipped entry.

{% hint style="danger" %} <mark style="color:red;">**No sound at all**</mark>
{% endhint %}

* `Config.SoundPlayer` must be the sound player you really run (`xsound`, `mx-surround` or `high_3dsounds`), and only that one should be used.
* Start the sound player **before** `complete_carplay`.
* Keep the sound player folder name as shipped (`xsound`, not `xsound-main` or `xsound-1.5`) and remove duplicate copies.
* The audio file must be in the sound player folder ([Music library](/complete-scripts/scripts/complete-carradio/music-library.md)) and its name in `file` must match exactly, extension included. With xsound, formats other than `.ogg` / `.mp3` must be added to `xsound/fxmanifest.lua`.
* With `high_3dsounds`, if local songs do not start, set `['high_3dsounds'] = ''` in `Config.MusicPaths`.
* On the player side, check the FiveM audio output device in the game settings.

{% hint style="danger" %} <mark style="color:red;">**"This song is not available anymore"**</mark>
{% endhint %}

The track is no longer in `Config.MusicLibrary` (or its `id` changed), or it is listed in `BlackListSongs` in `html/config.js`. Playlists saved before 3.3 keep their name and artwork, but old songs only come back once a library track with the same id exists.

{% hint style="danger" %} <mark style="color:red;">**The music is too quiet outside the vehicle**</mark>
{% endhint %}

This is intended: closed doors keep the sound inside, like a real car. Raise `Config.XSoundDistanceClose` (for example `15`) and `Config.XSoundDistanceOpen` in `config.lua` to taste.

## Phone

{% hint style="danger" %} <mark style="color:red;">**Contacts are empty or messages are not sent**</mark>
{% endhint %}

* `Config.PhoneType` must match the phone you run; it is not detected automatically ([Phone configuration](/complete-scripts/scripts/complete-carradio/installation.md#phone-configuration)). After changing phone script, update it.
* Start the phone **before** `complete_carplay`.
* Contacts are read from the vehicle owner, so they appear only on owned vehicles, not in restricted mode.
* Phones that are not in the list need `Config.PhoneType = 'custom'` and the custom functions filled in, and the phone must expose exports to read contacts and send messages. Without a phone, set `Config.DisablePhone = true`.

## Interface

{% hint style="danger" %} <mark style="color:red;">**I changed OpenKey (or OpenRearCameraKey) in the config but the key is still the old one**</mark>
{% endhint %}

FiveM saves key mappings for each player the first time they join and does not overwrite them. Players change the key in **Settings → Key Bindings → FiveM**. To register no default key, use an empty string (`''`), not `false`.

{% hint style="danger" %} <mark style="color:red;">**The interface is blank or does not load for some players**</mark>
{% endhint %}

The interface loads some libraries, fonts and the map tiles from the internet. Players behind a network, firewall, VPN or country that blocks those services can get a blank or broken screen. Ask the player to check F8 for failed downloads and try another connection. If you edited files in `html/`, put back the original ones from the download.

{% hint style="danger" %} <mark style="color:red;">**The screen appears in vehicles without a Car Radio**</mark>
{% endhint %}

The in-car screen is drawn on the `prop_taxi_meter_2` model. Another resource that spawns the same prop (taxi meters, TV or screen scripts) will show the Car Radio screen too. Remove or change the conflicting resource.

{% hint style="danger" %} <mark style="color:red;">**Low FPS on low-end PCs**</mark>
{% endhint %}

Set `Disable3DModel: true` in `html/config.js` to replace the interactive 3D vehicle model with a static background. If the problem stays, send us a `resmon` screenshot in a ticket.

{% hint style="danger" %} <mark style="color:red;">**Windows roll up by themselves while the Car Radio is running**</mark>
{% endhint %}

Fixed in the latest build. Download the latest version from the Cfx.re Portal, replace the resource folder (keep your config) and restart.
