{"record":{"id":"1cb603621881bfa9","repo":"iflytek/astron-agent","slug":"cannot-find-appid-authentication-information","errorCode":null,"errorMessage":"Cannot find appid authentication information","messagePattern":"Cannot find appid authentication information","errorType":"exception","errorClass":"AppAuthFailedExc","httpStatus":null,"severity":"error","filePath":"core/agent/infra/app_auth.py","lineNumber":199,"sourceCode":"                            \"code\": (\n                                app_detail.get(\"code\")\n                                if isinstance(app_detail, dict)\n                                else None\n                            ),\n                            \"result_count\": (\n                                len(app_detail.get(\"data\", []))\n                                if isinstance(app_detail, dict)\n                                and isinstance(app_detail.get(\"data\", []), list)\n                                else 0\n                            ),\n                        },\n                        ensure_ascii=False,\n                    )\n                }\n            )\n\n            if app_detail is None:\n                raise AppAuthFailedExc(self.app_id_not_found_msg)\n\n            if app_detail.get(\"code\") != 0:\n                raise AppAuthFailedExc(app_detail.get(\"message\", \"\"))\n\n            data = app_detail.get(\"data\", [])\n            if len(data) == 0:\n                raise AppAuthFailedExc(self.app_id_not_found_msg)\n\n            auth_list = data[0].get(\"auth_list\", [])\n            if len(auth_list) == 0:\n                raise AppAuthFailedExc(self.app_id_not_found_msg)\n\n            api_key = auth_list[0].get(\"api_key\")\n            api_secret = auth_list[0].get(\"api_secret\")\n            if not api_key or not api_secret:\n                raise AppAuthFailedExc(self.app_id_not_found_msg)\n\n            kong_sk = f\"{api_key}:{api_secret}\"","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/agent/infra/app_auth.py#L181-L217","documentation":"AppAuthFailedExc raised in sk() when the app-detail lookup returns None, using self.app_id_not_found_msg ('Cannot find appid authentication information'). It means the auth service could not find any record for the given app_id.","triggerScenarios":"Calling the sk credential flow with an app_id that does not exist in the auth service, was deleted, or is not visible to this environment (wrong space/env), causing app_detail to come back None.","commonSituations":"Typo'd or stale app_id in plugin/agent configuration; app deleted after configuration was saved; pointing a staging deployment at production auth data or vice versa.","solutions":["Verify the app_id is correct and still exists in the auth console","Point the service at the auth service/environment where the app_id is registered","Re-issue credentials and update the stored app configuration","Check the auth service query/permissions if the app exists but is not returned"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if not app_id or not app_id.strip():\n    raise ValueError(\"app_id is required\")","typeGuard":null,"tryCatchPattern":"try:\n    key = await auth.sk(app_id)\nexcept AppAuthFailedExc:\n    # prompt user to check the app_id / environment","preventionTips":["Verify app_ids against the auth console before saving configuration","Tag configurations with their environment to avoid cross-env app_ids","Detect deleted apps and alert configuration owners"],"tags":["auth","appid","not-found"],"backgroundTag":"record-not-found","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}