viggle-mine-workflow / docs /STARTUP_FIX.md
ZIP Space Deployer
Deploy ZIP — 2026-10-14 15:17 UTC
18bfeb9
|
Raw History Blame Contribute Delete
2.88 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade

HTTPS landing-page fix · 2026-10-14

The deployed root returned HTTP 307 with an absolute http:// Location even when requested over HTTPS. HF terminates TLS before forwarding requests to Python; request.url can therefore report HTTP. The old middleware copied that internal scheme into the browser-facing redirect. This is an actual deployment defect and can block the page inside the HTTPS HF iframe.

workflow_ui.py now returns a relative /?ui=canvas redirect, preserving existing query parameters and the browser's HTTPS origin. The redirect uses Cache-Control: no-store. This is the only production-code change in this startup fix; inference code and dependencies remain unchanged.

Validation:

  • 40 tests and 6 subtests pass, including an HTTP proxy-scope regression that checks resolution of the relative Location against the HTTPS browser URL.
  • A real local Gradio 6.30.0 process follows the redirect to HTTP 200 canvas HTML, resolves its configured canvas ID through component_server, and completes upload, queued Prepare Source, anchor serving and point saving.
  • The existing deployed https://fffiloni-viggle-mine-workflow.hf.space/?ui=canvas rendered the actual empty graph in the browser at 100% and fit-to-view 32%. This direct URL avoids the defective root redirect. It is not validation of the corrected build inside the HF iframe, nor of inference or mobile use.

The reported KeyError: 142 means a component-server request referenced an ID absent from the serving Blocks registry. In the inspected live config the canvas ID was 1; its read-only get_workflow_key request returned HTTP 200. That does not prove the user's request was caused by a stale cache. The original failing request was not reproduced, and this patch must not be described as a demonstrated fix for that exception. Do not remap unknown IDs or suppress the exception as a substitute for identifying the mismatch.

Deploy the updated consolidated archive, or replace only workflow_ui.py for the runtime fix. Then verify the embedded HF page and root redirect in the new deployment. No remote deployment was performed by this repair.

Subsequent construction repair

The consolidated execution repair additionally removes two lifecycle defects: with demo during GPU function registration reran canvas load-event attachment, and create_app followed by launch(_app=...) installed the native route and middleware stack twice. Registration now uses Gradio 6.30's _active_blocks helper, and the custom App receives native setup only in launch. A construction regression checks both the registration branch and live component registry. The complete suite is now 49 tests plus 6 subtests; the earlier counts above refer to the preceding HTTPS-only repair. Use the full consolidated package; replacing only workflow_ui.py is no longer the complete repair.