{"record":{"id":"f2b3fbb0be1cb74c","repo":"microg/GmsCore","slug":"no-checkin-available","errorCode":null,"errorMessage":"No checkin available","messagePattern":"No checkin available","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt","lineNumber":50,"sourceCode":"private suspend fun ensureCheckinIsUpToDate(context: Context) {\n    if (!CheckinPreferences.isEnabled(context)) throw RuntimeException(\"Checkin disabled\")\n    val lastCheckin = LastCheckinInfo.read(context).lastCheckin\n    if (lastCheckin < System.currentTimeMillis() - CheckinService.MAX_VALID_CHECKIN_AGE) {\n        val resultData: Bundle = suspendCoroutine { continuation ->\n            val intent = Intent(context, CheckinService::class.java)\n            val continued = AtomicBoolean(false)\n            intent.putExtra(CheckinService.EXTRA_RESULT_RECEIVER, object : ResultReceiver(null) {\n                override fun onReceiveResult(resultCode: Int, resultData: Bundle?) {\n                    if (continued.compareAndSet(false, true)) continuation.resume(resultData ?: Bundle.EMPTY)\n                }\n            })\n            ForegroundServiceContext(context).startService(intent)\n            Handler().postDelayed({\n                if (continued.compareAndSet(false, true)) continuation.resume(Bundle.EMPTY)\n            }, 10000L)\n        }\n        if (resultData.getLong(CheckinService.EXTRA_NEW_CHECKIN_TIME, 0L) + lastCheckin == 0L) {\n            throw RuntimeException(\"No checkin available\")\n        }\n    }\n}\n\nsuspend fun ensureAppRegistrationAllowed(context: Context, database: GcmDatabase, packageName: String) {\n    if (!GcmPrefs.get(context).isEnabled) throw RuntimeException(\"GCM disabled\")\n    val app = database.getApp(packageName)\n    if (app == null && GcmPrefs.get(context).confirmNewApps) {\n        val accepted: Boolean = suspendCoroutine { continuation ->\n            val i = Intent(context, AskPushPermission::class.java)\n            i.putExtra(AskPushPermission.EXTRA_REQUESTED_PACKAGE, packageName)\n            i.putExtra(AskPushPermission.EXTRA_RESULT_RECEIVER, object : ResultReceiver(null) {\n                override fun onReceiveResult(resultCode: Int, resultData: Bundle?) {\n                    continuation.resume(resultCode == Activity.RESULT_OK)\n                }\n            })\n            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)\n            i.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt#L32-L68","documentation":"Registration gate in PushRegisterService.ensureCheckinIsUpToDate: no valid check-in exists (lastCheckin missing or older than MAX_VALID_CHECKIN_AGE and the refresh attempt returned no data), so the device is unknown to the GCM backend.","triggerScenarios":"Thrown at play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after check-in completes — ensure check-in succeeds (network, enabled) before registering","Report ERROR_SERVICE_NOT_AVAILABLE to the app when no checkin is obtainable"],"exampleFix":null,"handlingStrategy":"retry","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"}