microg/GmsCore · error · RuntimeException
Would not sign in
Error message
Would not sign in
What it means
WebViewHelper.openWebWithAccount throws with this message when the AccountManager auth-token future fails or returns no usable result, meaning the silent web-login could not be completed for the given account.
Source
Thrown at vending-app/src/main/java/org/microg/vending/billing/ui/WebViewHelper.kt:102
private fun addLanguageParam(url: String): String {
val language = Locale.getDefault().language
return if (language.isNotEmpty()) {
Uri.parse(url).buildUpon().appendQueryParameter("hl", language).toString()
} else {
url
}
}
private fun openWebWithAccount(account: Account, url: String) {
try {
val service = "weblogin:continue=" + URLEncoder.encode(url, "utf-8")
val accountManager: AccountManager = AccountManager.get(activity)
val future = accountManager.getAuthToken(account, service, null, null, null, null)
val bundle = future.getResult(20, TimeUnit.SECONDS)
val authUrl = bundle.getString(AccountManager.KEY_AUTHTOKEN)
?: throw RuntimeException("authUrl is null")
if (authUrl.contains("WILL_NOT_SIGN_IN")) {
throw RuntimeException("Would not sign in")
}
if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Opening $authUrl")
webView.post {
if (SDK_INT >= 21) {
CookieManager.getInstance().removeAllCookies {
if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Cookies removed")
loadWebViewUrl(authUrl)
}
} else {
CookieManager.getInstance().removeAllCookie()
loadWebViewUrl(authUrl)
}
}
} catch (e: Exception) {
if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Failed to get weblogin auth.", e)
activity.finish()
}View on GitHub (pinned to 157c9d86ac)
Solutions
- Ensure the account is registered and signed in before invoking the flow
- Retry the token request or prompt the user to re-authenticate
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at vending-app/src/main/java/org/microg/vending/billing/ui/WebViewHelper.kt:102 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/37efec6f935f3c27.
Report an issue: GitHub.