{"record":{"id":"5e218566c47487f9","repo":"Tencent/matrix","slug":"cannot-find-debugstubpropfile","errorCode":null,"errorMessage":"Cannot find ${debugStubPropFile}","messagePattern":"Cannot find (.+?)","errorType":"console","errorClass":"GradleScriptException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/gradle/WeChatDebugStub2.gradle","lineNumber":31,"sourceCode":"import java.nio.file.Files\nimport java.nio.file.StandardCopyOption\nimport java.util.zip.ZipFile\nimport net.dongliu.apk.parser.*\n\nFile debugApk\nFile keystoreFile\nSet debugModules = []\nSet installAbis = []\nFile manifestFile = file('AndroidManifest.xml')\nFile propFile = file('debug.properties')\nFile debugStubPropFile = rootProject.file('debug-stub.properties')\n\ndef minSdk\ndef targetSdk\n\n// Load APK, keystore path from properties file.\nif (!debugStubPropFile.exists()) {\n    throw new GradleScriptException(\"Cannot find ${debugStubPropFile}\")\n} else {\n    def prop = new Properties()\n    debugStubPropFile.withInputStream { prop.load(it) }\n\n    def apkPath = prop.getProperty('apk', null)\n    if (apkPath) {\n        debugApk = rootProject.file(apkPath)\n        if (!debugApk.exists()) {\n            throw new GradleScriptException(\"Debugging APK not exist: ${debugApk}\")\n        }\n    } else throw new GradleScriptException(\"'apk' property not defined in ${debugStubPropFile}\")\n\n    def modules = prop.getProperty('modules', '').trim()\n    if (modules) {\n        debugModules.addAll modules.split(/\\s*,\\s*/)\n    }\n\n    def keystorePath = prop.getProperty('keystore', null)","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/gradle/WeChatDebugStub2.gradle#L13-L49","documentation":"WeChatDebugStub2.gradle loads a properties file (debugStubPropFile) that defines the debug APK path and module list; if the file does not exist on disk it throws GradleScriptException with the missing path in the message.","triggerScenarios":"Running the debug-stub build task without creating the expected .properties file, or with the file at a different location than the configured debugStubPropFile path.","commonSituations":"Fresh checkout/CI environment missing a local (non-committed) properties file; renaming or moving the properties file; forgetting the setup step documented in the script.","solutions":["Create the debug stub properties file at the expected path with apk=... and (optionally) modules=... entries","Check the configured debugStubPropFile path in the script matches where you put the file","Commit or generate the properties file in CI so the environment is reproducible"],"exampleFix":"// before\n# (file missing)\n// after\n# debug-stub.properties\napk=/path/to/app-debug.apk\nmodules=app","handlingStrategy":"validation","validationCode":"// before running the task\ndef propFile = file('debug-stub.properties')\nif (!propFile.exists()) throw new StopExecutionException('Create debug-stub.properties with apk=...')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Commit a template properties file with placeholders","Generate the file in CI setup steps","Document required file and keys in the module README"],"tags":["gradle","build-script","missing-file","properties"],"backgroundTag":"missing-config-file","analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}