microg/GmsCore · error · UnsupportedOperationException
INTERNAL_ERROR
INTERNAL_ERROR
Error message
Method <init2> realRecaptchaImpl is null
What it means
RecaptchaService.init2() requires a real RecaptchaImpl backend. If realRecaptchaImpl is still null after initialization attempts, it throws UnsupportedOperationException("Method <init2> realRecaptchaImpl is null"). The code=INTERNAL_ERROR indicates a server-side (service-side) internal failure: the service cannot serve init requests because its reCAPTCHA implementation was never created.
Source
Thrown at play-services-recaptcha/core/src/main/kotlin/org/microg/gms/recaptcha/RecaptchaService.kt:125
}
override fun init2(callback: IInitCallback, params: InitParams) {
lifecycleScope.launch {
Log.d(TAG, "init($params)")
try {
Log.d(TAG, "imps size: ${imps.size}")
for (recaptchaImpl in imps) {
Log.d(TAG, "recaptchaImpl:${recaptchaImpl}")
val recaptchaHandle = runCatching { recaptchaImpl.init(params) }.getOrNull() ?: continue
realRecaptchaImpl = recaptchaImpl
if (params.version == LEGACY_VERSION) {
callback.onHandle(Status.SUCCESS, recaptchaHandle)
} else {
callback.onResults(Status.SUCCESS, InitResults().also { it.handle = recaptchaHandle })
}
Log.d(TAG, "realRecaptchaImpl:${realRecaptchaImpl}")
return@launch
}
if (realRecaptchaImpl == null) {
throw UnsupportedOperationException("Method <init2> realRecaptchaImpl is null")
}
} catch (e: Exception) {
Log.w(TAG, e)
try {
if (params.version == LEGACY_VERSION) {
callback.onHandle(Status.INTERNAL_ERROR, null)
} else {
callback.onResults(Status.INTERNAL_ERROR, InitResults())
}
} catch (e: Exception) {
// Ignored
}
}
}
}
View on GitHub (pinned to 157c9d86ac)
Solutions
- Restart the microG/Play services process so the service can re-create realRecaptchaImpl
- Check device logs (Log.w in the catch block) for the underlying exception that prevented impl creation
- Reinstall/update microG to a version that includes the reCAPTCHA core module
- Retry the init() call after the service has fully started
Defensive patterns
Strategy: retry
Try / catch
try { service.init(params) } catch (e: UnsupportedOperationException) { if (e.message?.contains("realRecaptchaImpl") == true) restartServiceAndRetry() } Prevention
- Always call init() before other calls and retry on internal errors
- Monitor logcat for backend creation failures
- Keep microG installed with the reCAPTCHA module
When it happens
Trigger: Calling init()/init2() when the service failed to construct realRecaptchaImpl — e.g. the factory/dagger-like provider returned null, the underlying reCAPTCHA module failed to load, or initialization raced before the impl was set.
Common situations: microG service not fully started, broken installation missing the reCAPTCHA core, service restarted mid-request, or a bug in the impl-creation path (e.g. RecaptchaGuardImpl/RecaptchaWebImpl factory failure).
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/0ef509d65e363698.
Report an issue: GitHub.