{"record":{"id":"cddac59bc7416ed9","repo":"microg/GmsCore","slug":"api-not-available","errorCode":"API_NOT_AVAILABLE","errorMessage":"Not allowed visit","messagePattern":"Not allowed visit","errorType":"error_code","errorClass":"StandardIntegrityException","httpStatus":null,"severity":"error","filePath":"vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt","lineNumber":114,"sourceCode":"        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(),\n                    null,\n                    0,\n                    null,\n                    webViewRequestMode = bundle.getInt(KEY_REQUEST_MODE, 0)","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt#L96-L132","documentation":"Authorization gate in ExpressIntegrityServiceImpl.warmUpIntegrityToken: the computed PlayIntegrityData for the caller reports allowed != true — the app is not permitted (by the microG allow rules) to use express integrity — so warm-up is refused.","triggerScenarios":"Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the calling app is allowed to use Play Integrity in microG configuration","Return the not-allowed error to the client and skip token warm-up"],"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-14T00:17:10.932Z"}