microg/GmsCore · error · RuntimeException

Checkin disabled

Error message

Checkin disabled

What it means

Configuration gate in PushRegisterService.ensureCheckinIsUpToDate: check-in is disabled in microG settings (CheckinPreferences.isEnabled is false), so device registration cannot proceed and the pre-registration gate aborts with this RuntimeException.

Source

Thrown at play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt:33

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleService
import androidx.lifecycle.lifecycleScope
import org.microg.gms.checkin.CheckinPreferences
import org.microg.gms.checkin.CheckinService
import org.microg.gms.checkin.LastCheckinInfo
import org.microg.gms.common.ForegroundServiceContext
import org.microg.gms.common.PackageUtils
import org.microg.gms.gcm.GcmConstants.*
import org.microg.gms.ui.AskPushPermission
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine

private const val TAG = "GmsGcmRegister"

private suspend fun ensureCheckinIsUpToDate(context: Context) {
    if (!CheckinPreferences.isEnabled(context)) throw RuntimeException("Checkin disabled")
    val lastCheckin = LastCheckinInfo.read(context).lastCheckin
    if (lastCheckin < System.currentTimeMillis() - CheckinService.MAX_VALID_CHECKIN_AGE) {
        val resultData: Bundle = suspendCoroutine { continuation ->
            val intent = Intent(context, CheckinService::class.java)
            val continued = AtomicBoolean(false)
            intent.putExtra(CheckinService.EXTRA_RESULT_RECEIVER, object : ResultReceiver(null) {
                override fun onReceiveResult(resultCode: Int, resultData: Bundle?) {
                    if (continued.compareAndSet(false, true)) continuation.resume(resultData ?: Bundle.EMPTY)
                }
            })
            ForegroundServiceContext(context).startService(intent)
            Handler().postDelayed({
                if (continued.compareAndSet(false, true)) continuation.resume(Bundle.EMPTY)
            }, 10000L)
        }
        if (resultData.getLong(CheckinService.EXTRA_NEW_CHECKIN_TIME, 0L) + lastCheckin == 0L) {
            throw RuntimeException("No checkin available")
        }

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Enable device check-in in microG settings
  2. Catch the exception and report ERROR_SERVICE_NOT_AVAILABLE / not-registered to the caller
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt:33 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/20da64157e960901. Report an issue: GitHub.