{"record":{"id":"7300418d13e4b18d","repo":"shwenzhang/AndResGuard","slug":"the-signature-file-do-not-exit-raw-path-s-configuration","errorCode":null,"errorMessage":"the signature file do not exit. raw path= %s\n","messagePattern":"the signature file do not exit\\. raw path= (.+?)\n","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"AndResGuard-core/src/main/java/com/tencent/mm/resourceproguard/Configuration.java","lineNumber":340,"sourceCode":"\n          switch (tagName) {\n            case ATTR_SIGNFILE_PATH:\n              char ch = vaule.charAt(0);\n              switch (ch) {\n                // supports the writting style like ~/.android/debug.keystore. the symbol ~ represent the home directory of the current user.\n                case '~':\n                  mSignatureFile = new File(String.format(\"%s%s\", System.getProperty(\"user.home\"), vaule.substring(1)));\n                  break;\n                // relative to the directory of the xml config file.\n                case '.':\n                  mSignatureFile = new File(xmlConfigFileParentFile, vaule);\n                  break;\n                // keep the origin logical.\n                default:\n                  mSignatureFile = new File(vaule);\n              }\n              if (!mSignatureFile.isFile()) {\n                throw new IOException(String.format(\"the signature file do not exit. raw path= %s\\n\",\n                    mSignatureFile.getAbsolutePath()\n                ));\n              }\n              break;\n            case ATTR_SIGNFILE_STOREPASS:\n              mStorePass = vaule;\n              mStorePass = mStorePass.trim();\n              break;\n            case ATTR_SIGNFILE_KEYPASS:\n              mKeyPass = vaule;\n              mKeyPass = mKeyPass.trim();\n              break;\n            case ATTR_SIGNFILE_ALIAS:\n              mStoreAlias = vaule;\n              mStoreAlias = mStoreAlias.trim();\n              break;\n            default:\n              System.err.println(\"unknown tag \" + tagName);","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/shwenzhang/AndResGuard/blob/e4df245d82f27d9a2d0dd108260a3510cbaba849/AndResGuard-core/src/main/java/com/tencent/mm/resourceproguard/Configuration.java#L322-L358","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before (config.xml)\n<path value=\"~/keys/release.keystore\"/>\n// after (config.xml)\n<path value=\"/home/ci/keys/release.keystore\"/>","handlingStrategy":"validation","validationCode":"String p = signPathElement.getAttribute(\"value\");\njava.io.File f = new java.io.File(p.replaceFirst(\"^~\", System.getProperty(\"user.home\")));\nif (!f.isFile()) {\n  throw new IllegalStateException(\"keystore not found at resolved path: \" + f.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":"try {\n  new Configuration(configFile, ...);\n} catch (IOException e) {\n  if (e.getMessage().startsWith(\"the signature file do not exit\")) {\n    // the message contains the absolute path AndResGuard resolved; check it against the real keystore location\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["android","signing","keystore","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"e4df245d82f27d9a2d0dd108260a3510cbaba849","analyzedAt":"2026-09-12T17:49:07.798Z","contentChangedAt":"2026-09-12T17:49:07.798Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}