{"record":{"id":"3029bd414a92c7ba","repo":"microg/GmsCore","slug":"required-request-information-missing","errorCode":null,"errorMessage":"Required request information missing","messagePattern":"Required request information missing","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-core/src/main/java/org/microg/gms/auth/AskPermissionActivity.java","lineNumber":106,"sourceCode":"                callerUid = intent.getIntExtra(KEY_CALLER_UID, 0);\n                callerPid = intent.getIntExtra(KEY_CALLER_PID, 0);\n                fromAccountManager = intent.hasExtra(EXTRA_FROM_ACCOUNT_MANAGER);\n                if (intent.hasExtra(EXTRA_CONSENT_DATA)) {\n                    try {\n                        consentData = ConsentData.ADAPTER.decode(intent.getByteArrayExtra(EXTRA_CONSENT_DATA));\n                    } catch (Exception e) {\n                        Log.w(TAG, \"ConsentData decode failed\", e);\n                    }\n                }\n            }\n            if (accountName != null && accountType != null) {\n                account = new Account(accountName, accountType);\n            }\n        }\n\n        private void verify(Context context) throws Exception {\n            if (accountName == null || accountType == null || account == null) throw new IllegalArgumentException(\"Required account information missing\");\n            if (packageName == null || service == null) throw new IllegalArgumentException(\"Required request information missing\");\n            if (callerUid == 0) throw new IllegalArgumentException(\"Required caller information missing\");\n            PackageUtils.getAndCheckPackage(context, packageName, callerUid, callerPid);\n\n            PackageManager packageManager = context.getPackageManager();\n            ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0);\n            appLabel = packageManager.getApplicationLabel(applicationInfo);\n            appIcon = packageManager.getApplicationIcon(applicationInfo);\n        }\n    }\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.ask_permission);\n        data = new IntentData(getIntent());\n        try {\n            data.verify(this);\n        } catch (Exception e) {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-core/src/main/java/org/microg/gms/auth/AskPermissionActivity.java#L88-L124","documentation":"verify() also requires the requesting package name and the auth service (authToken type/service) extras. If either is null it throws IllegalArgumentException, since the consent dialog cannot know what permission is being requested or by which app.","triggerScenarios":"Launching AskPermissionActivity with account extras set but missing the packageName and/or service extras in the intent.","commonSituations":"Partially built auth intents during development; upgrade path where an extra was renamed and the old caller no longer supplies it; hand-rolled AccountAuthenticator responses omitting the service field.","solutions":["Set both the calling package name and the service (auth token type) extras on the intent before launching.","Validate the intent in your authenticator code before constructing it.","Align extra key names with the version of microg/play-services you depend on.","Log and reject requests missing extras at the authenticator level to give clearer errors."],"exampleFix":"// before\nIntent i = new Intent(context, AskPermissionActivity.class);\ni.putExtra(KEY_ACCOUNT_NAME, account.name);\n// after\ni.putExtra(KEY_ACCOUNT_NAME, account.name);\ni.putExtra(KEY_ANDROID_PACKAGE_NAME, callingPackage);\ni.putExtra(KEY_SERVICE, service);","handlingStrategy":"validation","validationCode":"if (packageName == null || service == null) throw new IllegalArgumentException(\"packageName and service extras are required\");","typeGuard":"if (intent.getStringExtra(KEY_ANDROID_PACKAGE_NAME) == null || intent.getStringExtra(KEY_SERVICE) == null) return false;","tryCatchPattern":"try { verify(context); } catch (IllegalArgumentException e) { setResult(RESULT_CANCELED); finish(); }","preventionTips":["Always include calling package and service extras","Validate intent completeness in the authenticator before launch","Keep extra key names in sync with the library version"],"tags":["android","auth","intent-extras","illegal-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}