{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreic3rfzmm6wzufsjr7dwomkfgne4k3b3eaxrce5hd4yu4tukzi365y",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mowycesik5j2"
  },
  "path": "/t/gradio-web-components-failing-to-load/177067#post_6",
  "publishedAt": "2026-06-23T06:52:43.000Z",
  "site": "https://discuss.huggingface.co",
  "tags": [
    "(click for more details)"
  ],
  "textContent": "Nice! Thanks, I think that test narrows it down quite a lot:\n\n* * *\n\nThe useful boundary now seems much clearer.\n\nFrom your matrix:\n\n\n    Works:\n    - direct https://<space-subdomain>.hf.space\n    - direct https://<space-subdomain>.hf.space/config\n    - iframe\n    - https://huggingface.co/api/spaces/<owner>/<space_name>\n\n    Fails:\n    - <gradio-app src=\"https://<space-subdomain>.hf.space\">\n    - <gradio-app space=\"<owner>/<space_name>\">\n    - https://huggingface.co/api/spaces/by-subdomain/<subdomain>\n\n\nThat is a very useful separation.\n\nIt 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.\n\nThe clearest broken piece is now:\n\n\n    https://huggingface.co/api/spaces/by-subdomain/<subdomain>\n\n\nespecially because it returns:\n\n\n    HTTP 400\n    Invalid repo name: owner/space - repo name includes an url-encoded slash\n\n\nwhile this works:\n\n\n    https://huggingface.co/api/spaces/<owner>/<space_name>\n\n\nSo I would now frame the issue as:\n\n\n    canonical/direct paths work,\n    derived/browser-facing integration paths fail\n\n\nor more concretely:\n\n\n    direct Space runtime:\n      works\n\n    direct Gradio /config:\n      works\n\n    iframe:\n      works\n\n    canonical HF Space API:\n      works\n\n    by-subdomain lookup:\n      fails\n\n    Gradio web component:\n      fails\n\n\nThat 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.\n\nUpdated 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)\n\nAt 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.\n\nShort version:\n\n\n    The Space works.\n    The direct /config endpoint works.\n    The canonical Space API works.\n    The iframe works.\n\n    The failing pieces are:\n    - by-subdomain\n    - Gradio Web Component embedding\n\n\nThat is a pretty strong signal that the failure is outside the user app runtime.",
  "title": "Gradio web components failing to load"
}