shwenzhang/AndResGuard · error
the signature file do not exit. raw path=
Error message
the signature file do not exit. raw path= %s
What it means
After parsing the <sign><path value=.../> element, readSignFromXml checks mSignatureFile.isFile() and throws this IOException when the keystore file does not exist at the resolved path. This is an existence validation performed during config parsing, before any signing attempt, so the build fails early with the raw (unexpanded) path.
Solutions
- Fix the <path value="..."/> in the <sign> section to point at an existing keystore file (absolute path is safest)
- Verify with ls/Get-Item that the keystore exists at exactly the path AndResGuard resolves it from (the build's working directory)
- Avoid ~ in the path — the JVM does not expand it; use the absolute path
Example fix
// before (config.xml) <path value="~/keys/release.keystore"/> // after (config.xml) <path value="/home/ci/keys/release.keystore"/>
Defensive patterns
Strategy: validation
Validate before calling
String p = signPathElement.getAttribute("value");
java.io.File f = new java.io.File(p.replaceFirst("^~", System.getProperty("user.home")));
if (!f.isFile()) {
throw new IllegalStateException("keystore not found at resolved path: " + f.getAbsolutePath());
} Try / catch
try {
new Configuration(configFile, ...);
} catch (IOException e) {
if (e.getMessage().startsWith("the signature file do not exit")) {
// the message contains the absolute path AndResGuard resolved; check it against the real keystore location
}
throw e;
} Prevention
- Use absolute keystore paths in config files; never use ~ (the JVM does not expand it)
- Copy the keystore to a known location in CI before the build
- Commit nothing but the path convention — document where keystores live per environment
When it happens
Trigger: The value of <path> inside the <sign> issue points to a keystore file that does not exist at that location — wrong relative path, file moved/deleted, or a path containing ~ that is not expanded (new File("~/x") is literal).
Common situations: CI machines where the keystore was never copied to the path in the config; relative paths resolved against a different working directory than expected; keystore regenerated under a new filename while the config still points at the old one.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Failed to obtain key with alias
- entry " " does not contain certificates
- Can't get private key, please check if storepass storealias…
- the signature file do not exit, raw path=
- No keystore passwords
AI-assisted analysis of shwenzhang/AndResGuard@e4df245d82 (2026-09-12).
Data as JSON: /api/errors/7300418d13e4b18d.
Report an issue: GitHub.
Appendix: source
Thrown at AndResGuard-core/src/main/java/com/tencent/mm/resourceproguard/Configuration.java:340
switch (tagName) {
case ATTR_SIGNFILE_PATH:
char ch = vaule.charAt(0);
switch (ch) {
// supports the writting style like ~/.android/debug.keystore. the symbol ~ represent the home directory of the current user.
case '~':
mSignatureFile = new File(String.format("%s%s", System.getProperty("user.home"), vaule.substring(1)));
break;
// relative to the directory of the xml config file.
case '.':
mSignatureFile = new File(xmlConfigFileParentFile, vaule);
break;
// keep the origin logical.
default:
mSignatureFile = new File(vaule);
}
if (!mSignatureFile.isFile()) {
throw new IOException(String.format("the signature file do not exit. raw path= %s\n",
mSignatureFile.getAbsolutePath()
));
}
break;
case ATTR_SIGNFILE_STOREPASS:
mStorePass = vaule;
mStorePass = mStorePass.trim();
break;
case ATTR_SIGNFILE_KEYPASS:
mKeyPass = vaule;
mKeyPass = mKeyPass.trim();
break;
case ATTR_SIGNFILE_ALIAS:
mStoreAlias = vaule;
mStoreAlias = mStoreAlias.trim();
break;
default:
System.err.println("unknown tag " + tagName);View on GitHub (pinned to e4df245d82)