EllanJiang/GameFramework · error · GameFrameworkException
File system name is invalid.
Error message
File system name is invalid.
What it means
ResourceManager.GetFileSystem validates fileSystemName before resolving it against the read-only or read-write file-system dictionaries. A null or empty name cannot map to any file system, so a GameFrameworkException is thrown. This prevents ambiguous lookups into resource storage.
Solutions
- Ensure fileSystemName is non-null and non-empty before invoking the API
- Check the resource version/config data that supplies the file-system name
- Confirm the file system was created/registered with the exact same name
Example fix
// before
var fs = GetFileSystem(fileSystemName, true);
// after
if (string.IsNullOrEmpty(fileSystemName)) { Log.Error("File system name required"); return null; }
var fs = GetFileSystem(fileSystemName, true); Defensive patterns
Strategy: validation
Validate before calling
if (string.IsNullOrEmpty(fileSystemName)) { Log.Error("File system name is empty"); return; } Type guard
bool IsValidFileSystemName(string n) => !string.IsNullOrEmpty(n);
Try / catch
try { /* API taking fileSystemName */ } catch (GameFrameworkException ex) when (ex.Message == "File system name is invalid.") { Log.Error(ex, "Bad file system name"); } Prevention
- Keep file-system names in constants or an enum-backed lookup, never raw strings from unvalidated config
- Validate version-list fields containing file-system names before use
- Ensure file systems are registered under exactly the same name used for lookup
When it happens
Trigger: Calling ResourceManager APIs that fetch an IFileSystem (e.g. when loading resources stored in a named file system) with a null or empty fileSystemName, for either the read-only or read-write storage case.
Common situations: File system name read from an empty config field, a version-list entry lacking a file-system name, or forgetting to set the name when creating/looking up custom file systems.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Can not load binary ' ' from file system which is not a…
- Can not load binary ' ' from file system which is not exist.
- Can not load binary ' ' from file system which is not ready.
- Can not load binary ' ' from file system which is not use…
- Dependency assets is invalid.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/5a9c28b34061e178.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.cs:2296
if (m_ResourceInfos == null)
{
return null;
}
ResourceInfo resourceInfo = null;
if (m_ResourceInfos.TryGetValue(resourceName, out resourceInfo))
{
return resourceInfo;
}
return null;
}
private IFileSystem GetFileSystem(string fileSystemName, bool storageInReadOnly)
{
if (string.IsNullOrEmpty(fileSystemName))
{
throw new GameFrameworkException("File system name is invalid.");
}
IFileSystem fileSystem = null;
if (storageInReadOnly)
{
if (!m_ReadOnlyFileSystems.TryGetValue(fileSystemName, out fileSystem))
{
string fullPath = Utility.Path.GetRegularPath(Path.Combine(m_ReadOnlyPath, Utility.Text.Format("{0}.{1}", fileSystemName, DefaultExtension)));
fileSystem = m_FileSystemManager.GetFileSystem(fullPath);
if (fileSystem == null)
{
fileSystem = m_FileSystemManager.LoadFileSystem(fullPath, FileSystemAccess.Read);
m_ReadOnlyFileSystems.Add(fileSystemName, fileSystem);
}
}
}
else
{View on GitHub (pinned to d0c010b051)