{"record":{"id":"2a5648c4241dc453","repo":"microg/GmsCore","slug":"null-callerkeymd5","errorCode":null,"errorMessage":"Null callerKeyMd5","messagePattern":"Null callerKeyMd5","errorType":"error_code","errorClass":"StandardIntegrityException","httpStatus":null,"severity":"error","filePath":"vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt","lineNumber":225,"sourceCode":"                val errorCode = intermediateIntegrityResponse.errorInfo?.let { error ->\n                    if (error.errorCode == null) {\n                        null\n                    } else if (error.testErrorType == TestErrorType.REQUEST_EXPRESS) {\n                        error.errorCode\n                    } else if (error.testErrorType == TestErrorType.WARMUP) {\n                        throw StandardIntegrityException(error.errorCode, \"Server-specified exception\")\n                    } else null\n                }\n\n                val defaultAccountName: String = runCatching {\n                    if (expressIntegritySession.webViewRequestMode != 0) {\n                        RESULT_UN_AUTH\n                    } else {\n                        AccountManager.get(context).getAccountsByType(DEFAULT_ACCOUNT_TYPE).firstOrNull()?.name ?: RESULT_UN_AUTH\n                    }\n                }.getOrDefault(RESULT_UN_AUTH)\n\n                val callerKeyMd5 = clientKey.encode().md5() ?: throw StandardIntegrityException(\"Null callerKeyMd5\")\n                val refreshClientKey = clientKey.newBuilder()\n                    .generated(makeTimestamp(System.currentTimeMillis()))\n                    .build()\n                val fixedAdvice = IntegrityAdvice.Builder()\n                    .advices(intermediateIntegrityResponse.integrityAdvice?.advices.ensureContainsLockBootloader())\n                    .build()\n                val intermediateIntegrityResponseData = IntermediateIntegrityResponseData(\n                    intermediateIntegrity = IntermediateIntegrity(\n                        expressIntegritySession.packageName,\n                        expressIntegritySession.cloudProjectNumber,\n                        defaultAccountName,\n                        refreshClientKey,\n                        intermediateIntegrityResponse.intermediateToken,\n                        intermediateIntegrityResponse.serverGenerated,\n                        expressIntegritySession.webViewRequestMode,\n                        errorCode,\n                        fixedAdvice\n                    ),","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt#L207-L243","documentation":"warmUpIntegrityToken computes an MD5 fingerprint of the caller's encoded client key and throws StandardIntegrityException('Null callerKeyMd5') when the MD5 computation returns null. This means the caller client key could not be hashed, so the request cannot be authenticated.","triggerScenarios":"clientKey.encode().md5() returns null during warmUpIntegrityToken — i.e., the encoded client key bytes are invalid or the hash helper fails.","commonSituations":"Malformed or empty client key passed by the calling app through the Play Integrity API binding; corrupted key material in the IPC bundle.","solutions":["Verify the calling app passes a valid, non-empty client key to the integrity API","Re-check how clientKey is built (generated timestamp, encoding) before the call","Update Google Play services / the Play Integrity library version","Clear Play Store / Play services data on the device to reset stored key state"],"exampleFix":"// before\nval callerKeyMd5 = clientKey.encode().md5() ?: throw StandardIntegrityException(\"Null callerKeyMd5\")\n// after\nval encoded = clientKey.encode()\nrequire(!encoded.isEmpty()) { \"Client key encoding produced no bytes\" }\nval callerKeyMd5 = encoded.md5() ?: throw StandardIntegrityException(\"Null callerKeyMd5\")","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    warmUpIntegrityToken()\n} catch (e: StandardIntegrityException) {\n    if (e.message?.contains(\"callerKeyMd5\") == true) {\n        // re-bind integrity session / reset key material\n    }\n}","preventionTips":["Use the official Play Integrity client library so key material is managed correctly","Clear Play Store/Play services data if key state becomes corrupted","Keep client library and Play services versions in sync"],"tags":["kotlin","play-integrity","null","md5","client-key"],"backgroundTag":"null-argument","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}