Skip to content

Troubleshooting

Common setup, worker, PowerShell, template, export, and saved design issues for 0r-clothing_designer

Common setup, worker, PowerShell, template, export, and saved design issues for 0r-clothing_designer

Use this page after you have already followed the setup guide.

External Worker Does Not Start#

Check these in order:

  1. Config.Worker.Mode = "external"
  2. the server console shows worker startup logs
  3. child process permission exists in server.cfg
  4. PowerShell works on the host
  5. the bundled worker file exists

Expected startup logs:

text
[0r-clothing_designer][worker] mode=external
[0r-clothing_designer][worker] external node=...
[0r-clothing_designer][worker] external daemon started pid=...

Required file:

text
[clothing_designer]/0r-clothing_designer/worker/fivemRpcWorker.cjs

Fast fallback:

lua
Config.Worker.Mode = "inprocess"

Then restart:

text
restart 0r-clothing_designer

Windows: Manual powershell.exe Test Gives Access is denied#

If this command fails:

powershell
powershell.exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'

do not assume the resource itself is broken yet.

Test the full system path instead:

powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'

If that works:

  • the short powershell.exe path is the problem
  • Windows PowerShell itself is still available
  • you can install pwsh and set Config.Worker.PowerShellPath if you want a fixed path

Linux: spawnSync pwsh ENOENT executable=pwsh#

This means the Linux host does not have PowerShell installed or visible in PATH.

Install it:

bash
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
source /etc/os-release
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell

Verify:

bash
pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'

If pwsh is installed in a non-standard path, set:

lua
Config.Worker.PowerShellPath = "/usr/bin/pwsh"

child spawn not allowed#

If logs mention child process restrictions, add this to server.cfg:

cfg
add_unsafe_child_process_permission 0r-clothing_designer

Then restart the resource.

Export Fails With ERR_ACCESS_DENIED#

If export logs show filesystem write denial, add:

cfg
add_filesystem_permission 0r-clothing_designer write 0r-clothing_exports

Then restart the server or restart the resource after the permission change.

Templates Do Not Appear#

Check these in order:

  1. files are inside templates/cloth_templates/male/... or female/...
  2. the second folder is a supported component key
  3. the file prefix matches the component folder
  4. the resource was refreshed and restarted after template changes

Good example:

text
templates/cloth_templates/male/jbib/jbib_015_u.ydd

Bad example:

text
templates/cloth_templates/male/jbib/feet_015_u.ydd

Preview Images Changed But UI Still Shows Old Files#

Preview files under templates/template_previews are static files from FiveM's point of view.

Run:

text
refresh
restart 0r-clothing_designer

Saved Designs Fail#

Check these in order:

  1. the SQL file was imported
  2. oxmysql is running
  3. Config.SavedDesigns.Enabled = true
  4. the selected remote storage provider is configured correctly

AI Generation Fails#

Check these in order:

  1. Config.AI.Enabled = true
  2. the correct provider is selected
  3. the provider API key is set
  4. the account has quota, billing, and model access

Export Succeeds But Clothing Does Not Load In Game#

Check:

  • 0r-clothing_exports is ensured
  • 0r-clothing_exports was restarted after export
  • your server build supports the addon clothing count you are loading

CodeWalker.Core.dll Could Not Load File Or Assembly#

If the worker starts but CodeWalker DLL loading fails on Windows, the DLL files may be blocked by Windows.

Common folder:

text
[clothing_designer]\0r-clothing_designer\worker\tools

Fix:

  1. stop the resource
  2. open that folder in File Explorer
  3. open PowerShell there
  4. run:
powershell
Get-ChildItem *.dll | Unblock-File
  1. restart the resource:
text
restart 0r-clothing_designer

Player Gets not_authorized#

The resource requires server-side authorization before the UI can be used.

Example:

lua
exports["0r-clothing_designer"]:grantPlayerAccess(source)
TriggerClientEvent("0r-clothing_designer:client:openClothingDesigner", source)

Still Broken?#

If you still cannot isolate the issue, collect:

  1. the worker startup logs
  2. the exact host OS
  3. your Config.Worker block
  4. whether the server is Windows or Linux
  5. whether the failure happens on template open, preview, or export

That is the shortest useful debug bundle for this resource.