{"record":{"id":"087b1dd71c90a4c6","repo":"shwenzhang/AndResGuard","slug":"unsupported-password-spec-for-description-spec","errorCode":null,"errorMessage":"Unsupported password spec for ${description}: ${spec}","messagePattern":"Unsupported password spec for (.+?): (.+?)","errorType":"exception","errorClass":"java.io.IOException","httpStatus":null,"severity":"error","filePath":"AndResGuard-core/src/main/java/apksigner/PasswordRetriever.java","lineNumber":326,"sourceCode":"        in = new FileInputStream(file);\n        mFileInputStreams.put(file, in);\n      }\n      byte[] encodedPwd = readEncodedPassword(in);\n      if (encodedPwd.length == 0) {\n        throw new IOException(\"Failed to read \" + description + \" : end of file reached in \" + file);\n      }\n      // By default, textual input from files is supposed to be treated as encoded using JVM's\n      // default character encoding.\n      return getPasswords(encodedPwd, Charset.defaultCharset());\n    } else if (spec.startsWith(\"env:\")) {\n      String name = spec.substring(\"env:\".length());\n      String value = System.getenv(name);\n      if (value == null) {\n        throw new IOException(\"Failed to read \" + description + \": environment variable \" + value + \" not specified\");\n      }\n      return getPasswords(value.toCharArray());\n    } else {\n      throw new IOException(\"Unsupported password spec for \" + description + \": \" + spec);\n    }\n  }\n\n  private void assertNotClosed() {\n    if (mClosed) {\n      throw new IllegalStateException(\"Closed\");\n    }\n  }\n\n  @Override\n  public void close() {\n    for (InputStream in : mFileInputStreams.values()) {\n      try {\n        in.close();\n      } catch (IOException ignored) {\n      }\n    }\n    mFileInputStreams.clear();","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/shwenzhang/AndResGuard/blob/e4df245d82f27d9a2d0dd108260a3510cbaba849/AndResGuard-core/src/main/java/apksigner/PasswordRetriever.java#L308-L344","documentation":"Sentinel validation error in PasswordRetriever.getPasswords: the password spec string does not match any supported scheme (pass:, file:, env:, stdin). The user passed a malformed --ks-pass/--key-pass value, e.g. a bare password without the 'pass:' prefix or a typo like 'env-' instead of 'env:'. The retriever cannot even determine the source, so it refuses up front.","triggerScenarios":"Thrown at AndResGuard-core/src/main/java/apksigner/PasswordRetriever.java:326 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported password spec prefixes: pass:<password>, stdin, file:<path>, env:<name>, or console","Fix typos in the spec prefix (e.g. 'pass:' vs 'pass') and remove leading/trailing whitespace or quoting artifacts","Update the calling script or configuration to emit a recognized spec format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}