EllanJiang/GameFramework · error · GameFrameworkException
Read-write path is invalid.
Error message
Read-write path is invalid.
What it means
VersionListProcessor.CheckVersionList throws this when the ResourceManager's read-write path (m_ReadWritePath) is null or empty. The check reads the remote/local version list file from Path.Combine(readWritePath, RemoteVersionListFileName) and compares it against the latest internal resource version, which is impossible without a path.
Solutions
- Assign ResourceManager.ReadWritePath before invoking the version-list check.
- Log/verify the path value right before the check to catch empty-path configuration early.
- Move path initialization to the earliest startup point (before CheckVersionList / UpdateResource flow begins).
Example fix
// before var result = m_ResourceManager.CheckVersionList(latestVersion); // path unset // after m_ResourceManager.ReadWritePath = Utility.Path.GetRegularPath(Application.persistentDataPath); var result = m_ResourceManager.CheckVersionList(latestVersion);
Defensive patterns
Strategy: validation
Validate before calling
// C#
if (string.IsNullOrEmpty(m_ResourceManager.ReadWritePath))
{
m_ResourceManager.ReadWritePath = Utility.Path.GetRegularPath(Application.persistentDataPath);
}
var result = m_ResourceManager.CheckVersionList(latestVersion); Prevention
- Assign ReadWritePath before any version checking begins.
- Log the path at bootstrap so silent empty-path configs are visible.
- Fail fast in config loading if the read-write path resolves to empty.
When it happens
Trigger: Calling CheckVersionList before ReadWritePath has been assigned on the ResourceManager, or after it was set to an empty string.
Common situations: Bootstrap code that calls the check-versions flow before path configuration; paths set only for some build targets; config load failure leaving the path empty.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Read-write path is invalid.
- Deserialize updatable version list failure.
- Parse updatable version list exception
- Updatable version list
- Read-only version list has been parsed.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/09a7cd4da15df2a3.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.VersionListProcessor.cs:85
{
throw new GameFrameworkException("Download manager is invalid.");
}
m_DownloadManager = downloadManager;
m_DownloadManager.DownloadSuccess += OnDownloadSuccess;
m_DownloadManager.DownloadFailure += OnDownloadFailure;
}
/// <summary>
/// 检查版本资源列表。
/// </summary>
/// <param name="latestInternalResourceVersion">最新的内部资源版本号。</param>
/// <returns>检查版本资源列表结果。</returns>
public CheckVersionListResult CheckVersionList(int latestInternalResourceVersion)
{
if (string.IsNullOrEmpty(m_ResourceManager.m_ReadWritePath))
{
throw new GameFrameworkException("Read-write path is invalid.");
}
string versionListFileName = Utility.Path.GetRegularPath(Path.Combine(m_ResourceManager.m_ReadWritePath, RemoteVersionListFileName));
if (!File.Exists(versionListFileName))
{
return CheckVersionListResult.NeedUpdate;
}
int internalResourceVersion = 0;
FileStream fileStream = null;
try
{
fileStream = new FileStream(versionListFileName, FileMode.Open, FileAccess.Read);
object internalResourceVersionObject = null;
if (!m_ResourceManager.m_UpdatableVersionListSerializer.TryGetValue(fileStream, "InternalResourceVersion", out internalResourceVersionObject))
{
return CheckVersionListResult.NeedUpdate;
}View on GitHub (pinned to d0c010b051)