microg/GmsCore · error · RuntimeException
authUrl is null
Error message
authUrl is null
What it means
WebViewHelper.openWebWithAccount resolves the Play auth token and builds a web-login URL; when the resulting authUrl comes back null, it throws with this message, aborting the web-view billing flow because no authentication URL could be obtained.
Source
Thrown at vending-app/src/main/java/org/microg/vending/billing/ui/WebViewHelper.kt:100
}
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)View on GitHub (pinned to 157c9d86ac)
Solutions
- Verify the account and URL inputs before starting the web-login flow
- Fall back to an error state in the billing UI when authUrl cannot be built
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at vending-app/src/main/java/org/microg/vending/billing/ui/WebViewHelper.kt:100 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/9df8641e716a0812.
Report an issue: GitHub.