microg/GmsCore · error · StandardIntegrityException
API_NOT_AVAILABLE
API_NOT_AVAILABLE
Error message
Not allowed visit
What it means
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.
Source
Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:114
Log.d(TAG, "onUnbind")
return super.onUnbind(intent)
}
}
private class ExpressIntegrityServiceImpl(private val context: Context, override val lifecycle: Lifecycle) : IExpressIntegrityService.Stub(), LifecycleOwner {
private var visitData: PlayIntegrityData? = null
override fun warmUpIntegrityToken(bundle: Bundle, callback: IExpressIntegrityServiceCallback?) {
lifecycleScope.launchWhenCreated {
runCatching {
val callingPackageName = bundle.getString(KEY_PACKAGE_NAME)
if (callingPackageName == null) {
throw StandardIntegrityException(IntegrityErrorCode.INTERNAL_ERROR, "Null packageName.")
}
visitData = callerAppToIntegrityData(context, callingPackageName)
if (visitData?.allowed != true) {
throw StandardIntegrityException(IntegrityErrorCode.API_NOT_AVAILABLE, "Not allowed visit")
}
val playIntegrityEnabled = VendingPreferences.isDeviceAttestationEnabled(context)
if (!playIntegrityEnabled) {
throw StandardIntegrityException(IntegrityErrorCode.API_NOT_AVAILABLE, "API is disabled")
}
if (!context.isNetworkConnected()) {
throw StandardIntegrityException(IntegrityErrorCode.NETWORK_ERROR, "No network is available")
}
val expressIntegritySession = ExpressIntegritySession(
packageName = callingPackageName ?: "",
cloudProjectNumber = bundle.getLong(KEY_CLOUD_PROJECT, 0L),
sessionId = Random.nextLong(),
null,
0,
null,
webViewRequestMode = bundle.getInt(KEY_REQUEST_MODE, 0)View on GitHub (pinned to 157c9d86ac)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:114 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/cddac59bc7416ed9.
Report an issue: GitHub.