{"record":{"id":"442efed4e8104671","repo":"openclaw/openclaw","slug":"missing-value-for-verify-apk","errorCode":null,"errorMessage":"Missing value for --verify-apk","messagePattern":"Missing value for --verify-apk","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/android/scripts/build-release-artifacts.ts","lineNumber":182,"sourceCode":"    const arg = argv[index];\n    switch (arg) {\n      case \"--artifact\": {\n        const value = argv[index + 1];\n        if (value !== \"all\" && value !== \"play\" && value !== \"wear\" && value !== \"third-party\") {\n          throw new Error(\"--artifact must be one of: all, play, wear, third-party\");\n        }\n        artifact = value;\n        index += 1;\n        break;\n      }\n      case \"--dry-run\": {\n        dryRun = true;\n        break;\n      }\n      case \"--verify-apk\": {\n        const value = argv[index + 1];\n        if (!value || value.startsWith(\"-\")) {\n          throw new Error(\"Missing value for --verify-apk\");\n        }\n        verifyApk = value;\n        index += 1;\n        break;\n      }\n      case \"-h\":\n      case \"--help\": {\n        console.log(\n          [\n            \"Usage: bun apps/android/scripts/build-release-artifacts.ts [--artifact all|play|wear|third-party] [--dry-run] [--verify-apk PATH]\",\n            \"\",\n            \"Builds the signed phone, Wear, and third-party Android artifacts.\",\n          ].join(\"\\n\"),\n        );\n        process.exit(0);\n      }\n      default: {\n        throw new Error(`Unknown argument: ${arg}`);","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/apps/android/scripts/build-release-artifacts.ts#L164-L200","documentation":"Thrown by parseArgs when `--verify-apk` is the last argument, has no following token, or its token starts with '-' (looks like another flag). The verify-apk mode requires a path to an existing APK to verify; an absent or flag-like value is treated as a missing operand.","triggerScenarios":"`--verify-apk` with nothing after it; `--verify-apk --dry-run` (next token is a flag); `--verify-apk -h`; quoted empty string `--verify-apk \"\"`.","commonSituations":"Operators forgetting the path; shell collapsing an undefined env var to empty; argument-order mistakes.","solutions":["Provide a real APK path: `--verify-apk apps/android/app/build/outputs/apk/release/app-release.apk`.","If the path may begin with '-', prefix `./' so it does not look like a flag.","Ensure any shell variable used for the path is set and non-empty."],"exampleFix":"// before\nbun build-release-artifacts.ts --verify-apk\n// after\nbun apps/android/scripts/build-release-artifacts.ts --verify-apk ./app-release.apk","handlingStrategy":"validation","validationCode":"function requireValue(flag: string, value: string | undefined): string {\n  if (!value || value.startsWith('-')) throw new Error(`Missing value for ${flag}`);\n  return value;\n}","typeGuard":"const isRealArgValue = (v: string | undefined): v is string =>\n  typeof v === 'string' && v.length > 0 && !v.startsWith('-');","tryCatchPattern":null,"preventionTips":["Always pass an explicit path after --verify-apk.","If the path could start with '-', prefix './'.","Validate shell variables are non-empty before forwarding."],"tags":["android","release","cli","validation","arguments"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}