Significant-Gravitas/AutoGPT · error · HTTPException
Sharing is not configured on this deployment
Error message
Sharing is not configured on this deployment
What it means
HTTP 500 from the share-enable endpoint (share.py:126). Share links are built from settings.config.frontend_base_url; when it is empty the server refuses to enable sharing rather than mint URLs pointing at localhost (which would only resolve on the backend host). The code logs 'frontend_base_url is not configured; refusing to enable share' and returns 500 — a deliberate deployment-misconfiguration tripwire fired at share-enable time.
Source
Thrown at autogpt_platform/backend/backend/api/features/chat/share.py:126
user_id: Annotated[str, Security(auth.get_user_id)],
body: EnableShareRequest = Body(default_factory=EnableShareRequest),
) -> ShareResponse:
"""Enable sharing for a chat session.
Flag-gated: refuses with 403 when ``chat-sharing`` is off so a stale
frontend cannot enable shares post-rollback.
"""
if not await is_feature_enabled(Flag.CHAT_SHARING, user_id):
raise HTTPException(status_code=403, detail="Chat sharing is not enabled")
base_url = settings.config.frontend_base_url
if not base_url:
# Fail fast rather than handing the user a localhost URL that
# only works on the backend host. This catches deployment
# misconfigurations at share-enable time instead of silently
# shipping broken share URLs to end users.
logger.error("frontend_base_url is not configured; refusing to enable share")
raise HTTPException(
status_code=500, detail="Sharing is not configured on this deployment"
)
try:
share_token = await share_db.enable_chat_session_share(
session_id=session_id,
user_id=user_id,
auto_share_executions=body.auto_share_executions,
)
except ValueError as exc:
raise HTTPException(status_code=404, detail=str(exc))
return ShareResponse(
share_url=f"{base_url}/share/chat/{share_token}",
share_token=share_token,
)
View on GitHub (pinned to 9c8bb5550f)
Solutions
- Set FRONTEND_BASE_URL (e.g. https://app.example.com) in the backend environment/.env and restart the backend.
- Verify with a follow-up request — once set, share tokens resolve to correct public URLs.
- Deployment checklists: include frontend_base_url in environment validation so misconfigs surface at boot, not at share time.
- Client-side: on 500 with this detail, surface 'sharing unavailable on this deployment' instead of a generic error.
Example fix
# before # backend/.env missing the var -> share enable returns 500 # after FRONTEND_BASE_URL=https://app.example.com
Defensive patterns
Strategy: validation
Validate before calling
// before enabling shares, confirm the deployment exposes a public frontend URL
const cfg = await getDeploymentConfig();
if (!cfg.frontend_base_url) {
showNotice('Sharing is unavailable on this deployment');
} else {
await post(`/chat/sessions/${id}/share/enable`);
} Type guard
function sharingConfigured(frontendBaseUrl: string | undefined | null): boolean {
return typeof frontendBaseUrl === 'string' && frontendBaseUrl.length > 0;
} Try / catch
try { await post(`/chat/sessions/${id}/share/enable`); } catch (e) { if (e.status === 500 && /not configured/.test(e.detail)) { showSharingUnavailable(); return; } throw e; } Prevention
- Set FRONTEND_BASE_URL in every backend environment (dev, staging, prod) as part of the setup checklist
- Validate frontend_base_url at backend boot so misconfigs surface before users do
- Client-side: map this 500 to a friendly 'sharing unavailable' message, never auto-retry
When it happens
Trigger: Enabling chat sharing on a deployment where FRONTEND_BASE_URL is unset/empty in backend settings — common in fresh local setups, misconfigured staging, or backend-only containers.
Common situations: New environment brought up without FRONTEND_BASE_URL in .env; docker-compose service missing the variable; renaming domains and forgetting the backend copy of the setting.
Related errors
- Rate limit reset is not available.
- Rate limit reset is not available (credit system is disabled
- No daily limit is configured — nothing to reset.
- You've used all {config.max_daily_resets} resets for today.
- Chat sharing is not enabled
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/0c8b2c5f32516cc5.
Report an issue: GitHub.