Troubleshooting
Common issues and their solutions.
Run EFM Diagnostics
The first step for any issue: run the built-in diagnostics.
RunEFMDiagnostics()
Check the Output Log for pass/fail results for every EFM function.
Common Issues
File Not Found
Symptom: FileExists() returns false for a file you know exists.
Solutions:
- Check the path format - use
NormalizePath()to fix mixed slashes - Use
GetAbsolutePath()to convert relative paths - Verify the file actually exists at the expected location
- Check file permissions
// Debug the path
FullPath = CreateFullPath(Directory, Name)
Log("Looking for: " + FullPath)
Log("Normalized: " + NormalizePath(FullPath))
Log("Is absolute: " + IsAbsolutePath(FullPath))
Permission Denied
Symptom: File operations fail with access errors.
Solutions:
- Don't write to protected directories (Program Files, etc.)
- Always use
GetGameSavedDirectory()for runtime writes - On Linux/Mac, check file ownership and permissions
- Run the editor as Administrator (Windows, for testing only)
JSON Read/Write Fails
Symptom: ReadJsonFile() returns false or data is missing.
Solutions:
- For nested JSON, use
ReadJsonFileNestedAsString()instead - Check that the JSON is valid (use a JSON validator)
ReadJsonFile()only supports flat key-value JSON objects- Use
WriteJsonFileNested()for nested structures
// Flat JSON works with ReadJsonFile
{"name": "Hero", "level": "42"}
// Nested JSON needs ReadJsonFileNestedAsString
{"player": {"name": "Hero", "stats": {"level": 42}}}
Download Fails
Symptom: DownloadFile() always fails.
Solutions:
- Check that the URL is valid and accessible
- Verify the save directory exists before downloading
- Check firewall/antivirus settings
- Use
GetRemoteFileSize()first to verify the URL works
// Test URL first
GetRemoteFileSize(Self, URL, OnComplete)
OnComplete(bSuccess, URL, FileSize):
if bSuccess:
Log("File size: " + FileSize)
// Now download
DownloadFile(Self, URL, SavePath, OnProgress, OnDownloadComplete)
else:
LogError("URL not accessible: " + URL)
Async Operations Not Firing
Symptom: Async callbacks never execute.
Solutions:
- Ensure the
WorldContextObjectis valid - The calling object must not be garbage collected before the callback fires
- Check the Output Log for async errors
- Test with synchronous versions first to isolate the issue
ZIP Operations Fail
Symptom: CompressFiles() or DecompressZip() returns false.
Solutions:
- Ensure the output directory exists before compressing
- Check that source files exist before compressing
- For decompression, ensure the destination directory is writable
- Use
ListZipContents()to verify the ZIP is valid
Encryption/Decryption Mismatch
Symptom: Decrypted data doesn't match original.
Solutions:
- Ensure the same key is used for encryption and decryption
- Don't modify the encrypted data between encrypt/decrypt
- Test with a simple string first to verify the key works
- Check that the key doesn't contain special characters that might be escaped
Platform-Specific Notes
Windows
- Path separator:
\(but/also works) - Symlinks require Administrator privileges or Developer Mode enabled
- File dialogs use native Windows dialogs
Linux
- Path separator:
/ - Case-sensitive file names
- File permissions matter (use
chmodif needed)
Mac
- Path separator:
/ - Case-insensitive by default (HFS+/APFS)
- Sandboxing may restrict file access
Getting Help
If the issue persists:
- Run
RunEFMDiagnostics()and share the Output Log - Check the GitHub Issues
- Email support: [email protected]
- Visit the author's website: simonecampitelli.com