-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
When running the Skyvern backend (skyvern) and frontend (skyvern-ui) containers via Docker Compose for a self-hosted setup, the UI displays an error: "Unable to verify Skyvern API key. The UI could not reach the diagnostics endpoint. Ensure the backend is running locally. Request failed with status code 403".
Diagnosis:
Upon investigation using browser developer tools and backend container logs:
- The Skyvern backend container is running correctly and accessible.
- All primary API requests from the UI to the backend (e.g., to
/api/v1/workflows) are succeeding with a200 OKstatus, indicating the API key (VITE_SKYVERN_API_KEY) is configured correctly and accepted by the backend. - The only request failing with a
403 Forbiddenstatus is the one made by the UI to/api/v1/internal/auth/status. - Accessing this
/api/v1/internal/auth/statusendpoint directly confirms the backend intentionally restricts it, returning{"detail":"Endpoint requires localhost access"}.
Conclusion:
The issue is not an incorrect API key configuration. The backend is correctly restricting access to the internal /internal/auth/status endpoint. The Skyvern UI frontend appears to misinterpret the 403 Forbidden response from this specific endpoint as a general API key failure, leading to a confusing and inaccurate error message for the user, even though the rest of the application is functional.
Suggested Fix:
The frontend UI should handle the 403 Forbidden response specifically from /api/v1/internal/auth/status more gracefully. Instead of showing a generic API key error, it should recognize that the backend is running but this particular endpoint is restricted, perhaps by showing a different status or simply suppressing this specific error if other essential API calls are successful.