{"record":{"id":"1d7e9df5c8bea91b","repo":"microg/GmsCore","slug":"internal-error-1d7e9d","errorCode":"INTERNAL_ERROR","errorMessage":"Null packageName.","messagePattern":"Null packageName\\.","errorType":"error_code","errorClass":"StandardIntegrityException","httpStatus":null,"severity":"error","filePath":"vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt","lineNumber":110,"sourceCode":"        return ExpressIntegrityServiceImpl(this, lifecycle).asBinder()\n    }\n\n    override fun onUnbind(intent: Intent?): Boolean {\n        Log.d(TAG, \"onUnbind\")\n        return super.onUnbind(intent)\n    }\n}\n\nprivate class ExpressIntegrityServiceImpl(private val context: Context, override val lifecycle: Lifecycle) : IExpressIntegrityService.Stub(), LifecycleOwner {\n\n    private var visitData: PlayIntegrityData? = null\n\n    override fun warmUpIntegrityToken(bundle: Bundle, callback: IExpressIntegrityServiceCallback?) {\n        lifecycleScope.launchWhenCreated {\n            runCatching {\n                val callingPackageName = bundle.getString(KEY_PACKAGE_NAME)\n                if (callingPackageName == null) {\n                    throw StandardIntegrityException(IntegrityErrorCode.INTERNAL_ERROR, \"Null packageName.\")\n                }\n                visitData = callerAppToIntegrityData(context, callingPackageName)\n                if (visitData?.allowed != true) {\n                    throw StandardIntegrityException(IntegrityErrorCode.API_NOT_AVAILABLE, \"Not allowed visit\")\n                }\n                val playIntegrityEnabled = VendingPreferences.isDeviceAttestationEnabled(context)\n                if (!playIntegrityEnabled) {\n                    throw StandardIntegrityException(IntegrityErrorCode.API_NOT_AVAILABLE, \"API is disabled\")\n                }\n\n                if (!context.isNetworkConnected()) {\n                    throw StandardIntegrityException(IntegrityErrorCode.NETWORK_ERROR, \"No network is available\")\n                }\n\n                val expressIntegritySession = ExpressIntegritySession(\n                    packageName = callingPackageName ?: \"\",\n                    cloudProjectNumber = bundle.getLong(KEY_CLOUD_PROJECT, 0L),\n                    sessionId = Random.nextLong(),","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt#L92-L128","documentation":"Input validation in ExpressIntegrityServiceImpl.warmUpIntegrityToken: the request bundle carries no package name (KEY_PACKAGE_NAME missing), so the warm-up call cannot identify the calling app and aborts with INTERNAL_ERROR.","triggerScenarios":"Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Always include the package name in the warm-up bundle","Reject malformed requests client-side before calling the service"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}