[BUG] Enhanced Build v90 to v97 - cfx_resource virtual filesystem cannot resolve nested resource files #207
Replies: 5 comments 5 replies
|
Can you craft a small reproduction resource? I can not reproduce this on windows with a windows server. |
|
I'm having the same issue on Linux build 96. Before you say "that's ox_lib's problem" — it isn't. Probing for optional files is normal, and the same calls are silent on master. What you need to do: LoadResourceFile misses are logged at info on Enhanced early-access (b96) LoadResourceFile returning nil is a documented outcome that resources branch on. Early-access logs every miss to the console at info level: [ info] [extra-natives-fi] Failed to open file 'cfx_resource_ox_lib:/imports/print/server.lua' ox_lib resolves modules lazily — it probes imports/X/.lua and imports/X/shared.lua for every lib.X access and treats nil as "not present". 20 unique paths miss per boot, and the cache is per-Lua-state, so every consuming resource re-probes. One ensure of 16 resources produced ~155 lines. A full boot is worse. It makes the txAdmin console unusable. This is not a VFS bug. Nested paths resolve fine — results track file existence exactly, nesting depth is irrelevant. imports/cron/server.lua and imports/logger/server.lua return true on b96 despite being nested and absent from ox_lib's files{}. Only nonexistent paths log. It's a regression. Master 32561 and 33230 contain none of these strings and do the identical probing silently. We can't work around it. Master has no gta5enhanced — only gta5 and rdr3 — so Enhanced requires early-access. No build without the logging, and no convar to disable it. Ask: demote to debug/trace, or gate behind a convar (default off). Minor: the line says in resource 'ox_lib' even while a different resource is starting, since LoadResourceFile targets ox_lib. Reads as ox_lib failing to load itself — that's what sent us down this path. |
|
The issue appears to be with FiveM Enhanced's Lua module resolution / virtual filesystem handling when resolving cross-resource require or import paths. Imports work when called internally within the same resource, but fail when another resource attempts to resolve modules from a dependency resource. |
|
Bump |
|
Is this still a thing with build 98? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
FiveM Enhanced Build v90 to v97 appears to have an issue resolving nested files through the cfx_resource_ virtual filesystem.
Root-level files load correctly using LoadResourceFile(), but files inside nested directories fail. This breaks resources that depend on standard CitizenFX resource imports, such as ox_lib.
Example failing path:
cfx_resource_ox_lib:/imports/print/server.lua
Issue type
Server
Repro rate
Always
Server build version
3570
OS
No response
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
Linux
OS version / distribution
Linux (running in Docker/Pterodactyl container)
CPU
No response
RAM
No response
Using txAdmin?
Yes
Hosting provider
Self-hosted
Machine type
VPS
/perf endpoint output
Not relevant. Issue occurs during resource file resolution.
DDoS protection
No
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
Not using docker-compose. Running through Pterodactyl.Steps to Reproduce
fxmanifest.lua
server.lua
Expected Behavior
LoadResourceFile() should successfully resolve nested files inside another resource.
Expected output:
root: true
nested: true
The following path should resolve:
cfx_resource_ox_lib:/imports/print/server.luaActual Behavior
Root-level resource files work.
Nested files fail.
Output:
root: true
nested: false
Evidence
Logs:
Working:
LoadResourceFile("ox_lib", "init.lua")Fails:
LoadResourceFile("ox_lib", "imports/print/server.lua")Affected resource:
ox_lib (official release, unmodified)
Additional Context
This issue appears to affect the newer resource import mechanism used by ox_lib.
ox_lib uses paths such as:
server_script '@ox_lib/imports/callback/server.lua'
These imports work on standard FXServer but fail on FiveM Enhanced Build v90 to v97.
The failure appears related to cfx_resource_ virtual filesystem path handling or nested resource file resolution.
The issue does not appear to be related to ox_lib itself because:
A minimal reproduction is included above.
All reactions