Skip to content

Conversation

@comfy-pr-bot
Copy link
Member

@comfy-pr-bot comfy-pr-bot commented Nov 4, 2025

Backport of #6572 to rh-test

Automatically created by backport workflow.

┆Issue is synchronized with this Notion page by Unito

)

## Summary
- Resolves multiple cloud environment issues when accessing
`/cloud/user-check` directly
- Fixes API routing problems that caused 304 Not Modified errors and
JSON parsing failures
- Maintains compatibility with subpath deployments for OSS users

## Root Cause
The `api_base` was incorrectly calculated as `/cloud` on cloud SPA
routes, causing API calls to use wrong paths like `/cloud/api/user`
instead of `/api/user`.

## Issues Fixed
- ❌ `/cloud/user-check` direct access resulted in infinite loading
- ❌ JSON parsing errors: `Unexpected token '<', "<!DOCTYPE "... is not
valid JSON`
- ❌ 304 Not Modified responses on `/cloud/api/user`,
`/cloud/api/settings/onboarding_survey`, `/cloud/api/system_stats`

## Solution
Added conditional `api_base` calculation in `ComfyApi` constructor:
- **Cloud SPA routes** (`/cloud/*`): Use empty `api_base` → API calls
use `/api/*` paths
- **Regular deployments**: Keep existing logic → Supports subpath
deployments

## Test Plan
- [x] Verify `/cloud/user-check` direct access works without infinite
loading
- [x] Verify all API calls return 200 instead of 304
- [x] Verify OSS subpath deployment compatibility unchanged
- [x] Test authentication flow completion

🤖 Generated with [Claude Code](https://claude.ai/code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6572-Fix-cloud-routing-issues-caused-by-incorrect-api_base-calculation-2a16d73d36508163aeb2cbf6347b427d)
by [Unito](https://www.unito.io)
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Nov 4, 2025
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 4, 2025
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 11/04/2025, 07:02:32 PM UTC

📈 Summary

  • Total Tests: 210
  • Passed: -110 ✅
  • Failed: 14 ❌
  • Flaky: 2 ⚠️
  • Skipped: 304 ⏭️

📊 Test Reports by Browser


🎉 Click on the links above to view detailed test results for each browser configuration.

@christian-byrne christian-byrne merged commit be942fb into rh-test Nov 5, 2025
20 of 26 checks passed
@christian-byrne christian-byrne deleted the backport-6572-to-rh-test branch November 5, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants