microg/GmsCore · error · StandardIntegrityException

INTERNAL_ERROR

INTERNAL_ERROR

Error message

Null packageName.

What it means

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.

Source

Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:110

        return ExpressIntegrityServiceImpl(this, lifecycle).asBinder()
    }

    override fun onUnbind(intent: Intent?): Boolean {
        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(),

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Always include the package name in the warm-up bundle
  2. Reject malformed requests client-side before calling the service
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at vending-app/src/main/kotlin/com/google/android/finsky/expressintegrityservice/ExpressIntegrityService.kt:110 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/1d7e9df5c8bea91b. Report an issue: GitHub.