iflytek/astron-agent · error · AppAuthFailedExc

Cannot find appid authentication information

Error message

Cannot find appid authentication information

What it means

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.

Solutions

  1. Verify the app_id is correct and still exists in the auth console
  2. Point the service at the auth service/environment where the app_id is registered
  3. Re-issue credentials and update the stored app configuration
  4. Check the auth service query/permissions if the app exists but is not returned
Defensive patterns

Strategy: validation

Validate before calling

if not app_id or not app_id.strip():
    raise ValueError("app_id is required")

Try / catch

try:
    key = await auth.sk(app_id)
except AppAuthFailedExc:
    # prompt user to check the app_id / environment

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/1cb603621881bfa9. Report an issue: GitHub.

Appendix: source

Thrown at core/agent/infra/app_auth.py:199

                            "code": (
                                app_detail.get("code")
                                if isinstance(app_detail, dict)
                                else None
                            ),
                            "result_count": (
                                len(app_detail.get("data", []))
                                if isinstance(app_detail, dict)
                                and isinstance(app_detail.get("data", []), list)
                                else 0
                            ),
                        },
                        ensure_ascii=False,
                    )
                }
            )

            if app_detail is None:
                raise AppAuthFailedExc(self.app_id_not_found_msg)

            if app_detail.get("code") != 0:
                raise AppAuthFailedExc(app_detail.get("message", ""))

            data = app_detail.get("data", [])
            if len(data) == 0:
                raise AppAuthFailedExc(self.app_id_not_found_msg)

            auth_list = data[0].get("auth_list", [])
            if len(auth_list) == 0:
                raise AppAuthFailedExc(self.app_id_not_found_msg)

            api_key = auth_list[0].get("api_key")
            api_secret = auth_list[0].get("api_secret")
            if not api_key or not api_secret:
                raise AppAuthFailedExc(self.app_id_not_found_msg)

            kong_sk = f"{api_key}:{api_secret}"

View on GitHub (pinned to 5e758547a8)