# Mods not loaded in headless mode on linux

**URL:** <https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194>\
**Category:** General\
**Tags:** mods\
**Created:** [28 May 2025 14:23 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194 "2025-05-28T14:23:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [28 May 2025 14:23 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/1 "2025-05-28T14:23:48Z")

</div>

Hello, when using the headless flag on linux my mod is not recognized anymore when loading it through BeamNGpy or `-lua "extensions.load('xlab_xlabCore')"`.  
I get this error: ` 1.94681|E|GELua.extensions| extension unavailable: "xlab_xlabCore" at location: "xlab/xlabCore"`  
But without the headless flag it works just well.  
My mod is zipped in the user mod folder and provides `lua/ge/extensions/xlab/xlabCore.lua`.

While looking at the lua codebase I also found this comment:  
`-headless is working differently than expected and should not be used`  
Is the `-noui` flag different?

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [30 May 2025 13:28 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/2 "2025-05-30T13:28:55Z")

</div>

Hello @comejv,

Headless mode shouldn’t affect the extensions. However, for the time being, please place the `/xlab` directory inside the following path in your BeamNG.tech root folder

Let me know if you need further assistance!

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [30 May 2025 17:25 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/3 "2025-05-30T17:25:19Z")

</div>

Hello @asaeed,  
Thank you for your answer! Copying lua/ge/extensions/xlab from my mod folder to the BeamNG root sources worked. What’s weird is that:

- I didn’t need to copy the files in lua/vehicles…
- I needed to use both `-headless` _and_ `-noui` at the same time otherwise the extension cannot be found, even after copying to root folder.

But also the console has a lot of errors due to headless, mainly :

```auto
13.24670|E|queueJSUITexture| UI texture '@screen_gps' not found. Unable to execute JS code: map.setData({"terrainTiles":{},"time":"13:20","nodes":{}})
13.35641|E|queueJSUITexture| UI texture '@screen_gps' not found. Unable to execute JS code: map.updateData({"x":-6.5611102399998e-06,"speed":0.027057242766023,"y":-0.00014384717451321,"zoom":150.04058586415,"ignitionLevel":2,"rotation":180.00030133538})
 13.35643|E|queueJSUITexture| (currently available UI textures: )

```

I tried putting `if headless_mode then return end` in a few places in `vehicle/controller/beamNavigator.lua` without success. Any idea how to suppress the error or fix it?

Thank you.

---

<div class="post-metadata">

**Author:** ![asaeed](https://forum.beamng.tech/user_avatar/forum.beamng.tech/asaeed/32/21_2.png) [@asaeed](https://forum.beamng.tech/u/asaeed)\
**Post date:** [30 May 2025 18:34 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/4 "2025-05-30T18:34:19Z")

</div>

Hello @comejv,  
Thank you for your feedback — we’ll look into it. Could you please let us know your versions of BeamNG.tech, BeamNGpy, and your Linux distribution and version?

Thank you.

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [30 May 2025 18:37 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/5 "2025-05-30T18:37:21Z")

</div>

Sure thing!  
0.35, 1.32, Ubuntu 24.04.2 LTS on kernel 6.8.0-60-generic.

If you need me to run tests on my end don’t hesitate to ask!

---

<div class="post-metadata">

**Author:** ![aivora](https://forum.beamng.tech/user_avatar/forum.beamng.tech/aivora/32/13_2.png) [@aivora](https://forum.beamng.tech/u/aivora)\
**Post date:** [4 June 2025 07:29 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/6 "2025-06-04T07:29:52Z")

</div>

Hi, thank you for the report, I fixed the issue for 0.36 🙂

Headless mode is the only mode that works without spawning a window, not sure what the comments in lua codebase try to say.

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [4 June 2025 10:29 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/7 "2025-06-04T10:29:35Z")

</div>

Thanks a lot! Any quick patch I can apply?

---

<div class="post-metadata">

**Author:** ![aivora](https://forum.beamng.tech/user_avatar/forum.beamng.tech/aivora/32/13_2.png) [@aivora](https://forum.beamng.tech/u/aivora)\
**Post date:** [4 June 2025 12:21 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/8 "2025-06-04T12:21:20Z")

</div>

Running with both `-headless -noui` should work as a quick fix, after the patch `-noui` can be removed (but should not cause extra issues).

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [4 June 2025 14:44 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/9 "2025-06-04T14:44:13Z")

</div>

What about the `queueJSUITexture` errors, any way to block them?

---

<div class="post-metadata">

**Author:** ![aivora](https://forum.beamng.tech/user_avatar/forum.beamng.tech/aivora/32/13_2.png) [@aivora](https://forum.beamng.tech/u/aivora)\
**Post date:** [5 June 2025 07:33 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/10 "2025-06-05T07:33:57Z")

</div>

You should be able to patch `lua/ge/extensions/ui/uiNavi.lua` like this:

```lua
local function requestVehicleDashboardMap(dashboard, initmap, vehId)
  if not dashboard then return end
  if headless_mode then return end -- add this line
  local targetVeh = vehId and scenetree.findObjectById(vehId) or getPlayerVehicle(0)
  if targetVeh then
  -- ... rest of function
end

```

Or disable/remove any navigation dashboards you are using (the UI app, but also navigation dashboards inside vehicles).

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [5 June 2025 14:45 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/11 "2025-06-05T14:45:59Z")

</div>

The patch didn’t work. I tried adding that line in uiNavi, beamNavigator, dynoClient and vehicles (basically at every mention of queueJSUITexture) and I still get this error approx 15 times per second:

```auto
13.82670|E|queueJSUITexture| UI texture '@screen_gps' not found. Unable to execute JS code: map.updateData({"x":0.0017002310266889,"speed":15.318448448181,"y":-1.7668433804065,"zoom":172.97767267227,"ignitionLevel":2,"rotation":180.11276650324})
 13.82672|E|queueJSUITexture| (currently available UI textures: )

```

Is there a way to remove the dashboards using beamngpy? Or in Lua?

---

<div class="post-metadata">

**Author:** ![aivora](https://forum.beamng.tech/user_avatar/forum.beamng.tech/aivora/32/13_2.png) [@aivora](https://forum.beamng.tech/u/aivora)\
**Post date:** [6 June 2025 08:30 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/12 "2025-06-06T08:30:19Z")

</div>

Can you please share the script that spams these errors? I cannot reproduce and would have to guess where the issues come from. There are a few more places which call `queueJSUITexture` under the hood, for example the `obj:queueWebViewJS` function, but I didn’t manage to set up an environment where I’d get the logspam.

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [9 June 2025 18:26 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/13 "2025-06-09T18:26:44Z")

</div>

Hello, here is the minimal steps needed to reproduce the issue on my end:

```python
>>> from beamngpy import BeamNGpy, Scenario, Vehicle
>>> b = BeamNGpy(host="127.0.0.1", port=25252)
>>> scenario = Scenario("tech_ground", "On how to use custom mods")
>>> v=Vehicle("ego_vehicle", model="etk800", license="AI")
>>> scenario.add_vehicle(v, pos=(0, 0, 0), rot_quat=(0, 0, 1, 0))
>>> b.open()
<beamngpy.beamng.beamng.BeamNGpy object at 0x7fffe9388b60>
>>> scenario.make(b)
>>> b.scenario.load(scenario)

```

Exerpts from the lua console that seem relevant:

```auto
160.45826|I|spawn| Spawning object 'etk800' with default config
160.48770|D|GELua.core_vehicle_manager.vehicleLoader| partConfigData [string] = ""
160.48877|W|GELua.core_vehicle_partmgmt.| Problems reading requested configuration: ""
160.48885|W|GELua.core_vehicle_partmgmt.main| Supplied config file: not found. Using default config instead.
160.52286|E|GELua.jbeam.loadJBeamFile| Duplicate part found: license_plate_qld_1 from file /vehicles/common/licenseplates/mount_coottha/license-plate-mountcoottha-2-1.jbeam
...
161.40896|I|BeamNGVehicle| Unable to create UI texture, as UI is disabled
161.41715|I|BeamNGVehicle| Unable to create UI texture, as UI is disabled
161.41726|E|queueJSUITexture| UI texture '@etk800_gauges_screen' not found. Unable to execute JS code: setup({"uiUnitPower":"hp","uiUnitTorque":"metric","uiUnitVolume":"l","uiUnitDate":"ger","uiUnitConsumptionRate":"metric","uiUnitLength":"metric","displayWidth":512,"materialName":"@etk800_gauges_screen","displayHeight":256,"uiUnitWeight":"kg","uiUnitEnergy":"metric","uiUnitPressure":"bar","uiUnitTemperature":"c","htmlPath":"local://local/vehicles/etk800/gauges_screen/gauges_screen.html","unit":"metric"})
161.41726|E|queueJSUITexture| (currently available UI textures: )
161.42369|E|GELua.scenario_scenarios.scenarios| Prefab: on how to use custom mods already exist in level. Rejecting loading of duplicate.
...
161.93113|D|GELua.core_gamestate.gamestate| exiting : worldReadyState
161.93113|W|GELua.core_gamestate.gamestate| trying to exit state we haven't been in before -please check your code
161.93114|D|GELua.core_gamestate.gamestate| show main menu (false)
161.93115|D|GELua.core_gamestate.gamestate| exiting loading screen to menu
...
162.00093|E|queueJSUITexture| UI texture '@etk800_screen' not found. Unable to execute JS code: map.updateData({"x":9.291918541976e-05,"speed":0.33106674849987,"y":0.00031327302394857,"zoom":150.49660012275,"ignitionLevel":2,"rotation":359.99563368789})
162.00097|E|queueJSUITexture| (currently available UI textures: )
162.02892|E|queueJSUITexture| UI texture '@etk800_screen' not found. Unable to execute JS code: map.updateData({"x":-4.9842790303956e-05,"speed":0.4200365871191,"y":0.00037013318146251,"zoom":150.63005488068,"ignitionLevel":2,"rotation":359.99943127307})
162.02894|E|queueJSUITexture| (currently available UI textures: )
162.04114|D|libbeamng.XalVE| Loaded vehicle xlabCore
162.04121|I|libbeamng.TechCom| Started listening on 127.0.0.1/42749.
162.05289|I|GELua.tech_techCore.TechGE| New vehicle connection: 2665, 42749
162.06897|E|queueJSUITexture| UI texture '@etk800_screen' not found. Unable to execute JS code: map.updateData({"x":0.00015931217882326,"speed":0.48061328530312,"y":-0.00023253862434558,"zoom":150.72091992795,"ignitionLevel":2,"rotation":359.99977278252})
162.06899|E|queueJSUITexture| (currently available UI textures: )
...
162.39889|I|libbeamng.TechVE| Accepted new vehicle client: 127.0.0.1/38918
162.44295|E|queueJSUITexture| UI texture '@etk800_screen' not found. Unable to execute JS code: map.updateData({"x":7.638679729105e-05,"speed":0.32665564119816,"y":-0.00028206199522174,"zoom":150.4899834618,"ignitionLevel":2,"rotation":359.99958153723})
162.44297|E|queueJSUITexture| (currently available UI textures: )
etc.

```

And changing the vehicle model to `utv` gives the `@screen_gps` errors I reported earlier.

These results are with the suggested `requestVehicleDashboardMap` patch, without loading my extensions.

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [9 June 2025 21:41 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/14 "2025-06-09T21:41:40Z")

</div>

Quick update, after trying things from a clean install of BeamNG I realised that putting my mod’s files in the main lua folder is not what resolved the issue, I only needed `-noui` in addition to `-headless`.

The `queueJSUITexture` issue continues.

---

<div class="post-metadata">

**Author:** ![aivora](https://forum.beamng.tech/user_avatar/forum.beamng.tech/aivora/32/13_2.png) [@aivora](https://forum.beamng.tech/u/aivora)\
**Post date:** [13 June 2025 14:00 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/15 "2025-06-13T14:00:46Z")

</div>

Hi again, thank you for the update, I tested with the 0.35.5.0 BeamNG.tech build with the `-headless` argument and the Python script you provided, and I’m not getting any errors relaed to `queueJSUITexture`. Did you also try without the mod? Only thing I can think of is that one of the files in the mod overrides a BeamNG Lua file, causing this error to happen.

---

<div class="post-metadata">

**Author:** ![comejv](https://forum.beamng.tech/user_avatar/forum.beamng.tech/comejv/32/75_2.png) [@comejv](https://forum.beamng.tech/u/comejv)\
**Post date:** [13 June 2025 15:06 UTC](https://forum.beamng.tech/t/mods-not-loaded-in-headless-mode-on-linux/194/16 "2025-06-13T15:06:10Z")

</div>

Thank you for the update.  
Have you tried with the `-noui` flag? The issue only appears when I use both `-headless` and `-noui`. I need the latter because without it my mod is not found by BNG when using `-headless`.

On my end the issue appears even on a freshly unzipped BNG and with the mod deleted from user folder.
