External Publication
Visit Post

Gradio web components failing to load

Hugging Face Forums [Unofficial] June 23, 2026
Source

Nice! Thanks, I think that test narrows it down quite a lot:


The useful boundary now seems much clearer.

From your matrix:

Works:
- direct https://<space-subdomain>.hf.space
- direct https://<space-subdomain>.hf.space/config
- iframe
- https://huggingface.co/api/spaces/<owner>/<space_name>

Fails:
- <gradio-app src="https://<space-subdomain>.hf.space">
- <gradio-app space="<owner>/<space_name>">
- https://huggingface.co/api/spaces/by-subdomain/<subdomain>

That is a very useful separation.

It makes this look much less like a Space runtime / app-code problem, because the direct app path, direct /config, iframe embedding, and canonical Space API path all work.

The clearest broken piece is now:

https://huggingface.co/api/spaces/by-subdomain/<subdomain>

especially because it returns:

HTTP 400
Invalid repo name: owner/space - repo name includes an url-encoded slash

while this works:

https://huggingface.co/api/spaces/<owner>/<space_name>

So I would now frame the issue as:

canonical/direct paths work,
derived/browser-facing integration paths fail

or more concretely:

direct Space runtime:
  works

direct Gradio /config:
  works

iframe:
  works

canonical HF Space API:
  works

by-subdomain lookup:
  fails

Gradio web component:
  fails

That strongly points away from the user app and toward the web component’s Space identity/status/config-resolution path, with /api/spaces/by-subdomain/<subdomain> being the most obvious failing endpoint.

Updated hypothesis (click for more details) How I would summarize the bug report upstream (click for more details) Relation to the Spaces proxy / CORS thread (click for more details)

At this point, I would probably stop focusing on the app code and report this as a Gradio Web Component / Hugging Face Spaces by-subdomain or Space identity-resolution bug.

Short version:

The Space works.
The direct /config endpoint works.
The canonical Space API works.
The iframe works.

The failing pieces are:
- by-subdomain
- Gradio Web Component embedding

That is a pretty strong signal that the failure is outside the user app runtime.

Discussion in the ATmosphere

Loading comments...