langgenius/dify · error · NotFound

Installed app not found

Error message

Installed app not found

What it means

HTTP 404 raised by GET /console/explore/installed-apps/<installed_app_id>. The InstalledApp row itself loaded fine (via the InstalledAppResource decorator), but InstalledAppService.get_published_app returned None — i.e. no published App is reachable for that installed app.

Source

Thrown at api/controllers/console/explore/installed_app.py:256

@console_ns.route("/installed-apps/<uuid:installed_app_id>")
class InstalledAppApi(InstalledAppResource):
    """
    get, update, and delete an installed app
    use InstalledAppResource to apply default decorators and get installed_app
    """

    @console_ns.response(200, "Success", console_ns.models[InstalledAppResponse.__name__])
    @with_current_user
    @with_current_tenant_id
    def get(
        self,
        current_tenant_id: str,
        current_user: Account,
        installed_app: InstalledApp,
    ):
        app_model = InstalledAppService.get_published_app(installed_app.app_id, session=db.session)
        if app_model is None:
            raise NotFound("Installed app not found")
        if current_user.current_tenant is None:
            raise ValueError("current_user.current_tenant must not be None")

        current_user.role = TenantService.get_user_role(current_user, current_user.current_tenant, session=db.session())
        return dump_response(
            InstalledAppResponse,
            _installed_app_response_data(
                installed_app,
                app_model,
                current_tenant_id=current_tenant_id,
                current_user=current_user,
            ),
        )

    @console_ns.response(204, "App uninstalled successfully")
    @with_current_tenant_id
    def delete(self, current_tenant_id: str, installed_app: InstalledApp):
        if installed_app.app_owner_tenant_id == current_tenant_id:

View on GitHub (pinned to ef8544b173)

Solutions

  1. On the client, treat this as 'app no longer available' and remove/hide the installed-app entry from the user's view.
  2. Have the owning tenant re-publish or restore the App, then retry.
  3. As admin, clean up installed_apps rows whose published App is missing: SELECT ia.* FROM installed_apps ia LEFT JOIN apps a ON a.id = ia.app_id WHERE a.id IS NULL OR <not-published-condition>.
  4. Provide a 'reinstall from Explore' affordance so the user can re-add a working copy if the app is relisted.

Example fix

// before: blindly open installed app detail
const detail = await get(`/console/explore/installed-apps/${id}`);

// after: handle 404 by retiring the stale tile
try {
  const detail = await get(`/console/explore/installed-apps/${id}`);
} catch (e) {
  if (e.status === 404) removeFromWorkspace(id);
  else throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Preflight the installed app before opening detail
async function publishedAppAvailable(installedAppId) {
  const r = await fetch(`/console/explore/installed-apps/${installedAppId}`);
  if (r.status === 404) return false;
  if (!r.ok) throw r;
  return true;
}

Try / catch

try {
  return await get(`/console/explore/installed-apps/${id}`);
} catch (e) {
  if (e.status === 404 && /Installed app not found/.test(e.message)) {
    removeInstalledAppTile(id); // backing App no longer published
    return null;
  }
  throw e;
}

Prevention

When it happens

Trigger: GET /console/explore/installed-apps/<id> where the underlying App was unpublished or deleted by its owner tenant after this tenant installed it. The installed_apps row remains but the published App backing it is gone.

Common situations: App owner deleted or unpublished the app; the App row exists but is no longer in a published state; cross-tenant teardown of the owning workspace left dangling installed_apps rows.

Related errors


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/506ec1e7b1447bff. Report an issue: GitHub.