Space is in "Building" state forever with no build logs

Unless it’s intentionally disabled, there are cases where we users can work around it ourselves. If you’re lucky, it might be fixed simply by changing the hardware or modifying the sdk: in README.md and reverting it.


Here are the concrete workarounds that people actually use when a Space is “forever Building” with no logs.

I’ll separate:

  • A) How to get this app running again
  • B) How to update production safely in the future

A) Getting your broken Space running again

From multiple similar reports, once a Space ends up permanently in “Building” / “Preparing” with no logs, there is usually no reliable “repair” from your side. The standard workaround is to move the code to a new Space and abandon that instance for deployments. (Hugging Face Forums)

1. Create a new Space and push the same repo

This is the main workaround:

  1. Create a new private Space, e.g. Ark-kun/tangle-staging

    • Same SDK (Gradio/Streamlit/FastAPI/etc.)
    • Start on CPU Basic.
  2. Locally:

    git clone https://huggingface.co/spaces/Ark-kun/tangle tangle-local
    cd tangle-local
    
    git remote rename origin old
    git remote add origin https://huggingface.co/spaces/Ark-kun/tangle-staging
    git push -u origin --all
    git push origin --tags
    
  3. Open tangle-staging in the UI and let it build.

In the forum threads, the same code almost always builds fine in the new Space while the old one stays broken. (Hugging Face Forums)

If tangle-staging builds and runs, you have confirmed:

  • Your code and requirements are OK.
  • The original Ark-kun/tangle instance is just “burned” (infra / metadata issue).

Then:

  • Mark the old Space as Private and maybe rename it to tangle-broken to keep history but not deploy from it anymore. (Hugging Face Forums)

2. If the new Space also gets stuck

If a fresh Space with the same code is also stuck in Building with empty logs:

  1. Create a minimal hello-world Space (1-file Gradio or Streamlit).

  2. If even that one is stuck in Building/Preparing with no logs:

    • You are likely hitting either:

      • A broader HF infra incident, or
      • An account-level issue (flag/ban) that surfaces as “permanent Building/Preparing” and “logs not found”. (Hugging Face Forums)
    • At that point, contact HF (see section D below) before touching production.


B) Safely updating production (so you don’t brick it)

Given the number of “Space is permanently Building” reports, the safest pattern is to never push untested changes directly to your only production Space.

Use a staging + blue/green approach:

1. Staging Space (always deploy here first)

  1. Keep Ark-kun/tangle as current production (do not touch yet).

  2. Use Ark-kun/tangle-staging as a staging Space:

    • Push every change there.

    • Wait for:

      • Build to finish.
      • App to start and pass smoke tests.
  3. Only once staging is healthy do you promote it to production.

2. Promotion options

You have two main options:

Option A – Swap slugs (if you don’t care about the URL changing internally):

  • Rename current prod Ark-kun/tangleArk-kun/tangle-old.
  • Rename Ark-kun/tangle-stagingArk-kun/tangle.

Option B – Blue/green (recommended if you front this with your own routing):

  • Have two production Spaces, e.g.:

    • Ark-kun/tangle-a
    • Ark-kun/tangle-b
  • One is “live” at a time.

  • Your clients (or a small proxy/frontend) point to whichever is live.

  • Deployment flow:

    1. Deploy new commit to the inactive Space.
    2. If it builds and behaves correctly, switch routing to that Space.
    3. Keep the previous one untouched as a rollback.

This pattern is what HF community members now recommend because it completely avoids bricking your only prod instance when infra glitches hit. (Hugging Face Forums)


C) Minor “kicks” that sometimes help (low priority)

These are low-risk experiments. They sometimes clear weird metadata/cache state, but success rate is much lower than “create a new Space”.

  1. Toggle hardware

    • Change the broken Space to CPU Basic, save, then “Factory rebuild”.
    • If it ever comes back, you can switch back to GPU.
    • In at least one thread, repeated rebuilds eventually surfaced an explicit “no hardware capacity” error instead of hanging. (Hugging Face Forums)
  2. Tiny README / SDK change

    • Edit README.md (or temporarily change sdk: in the metadata to a different type and back) to force the backend to re-evaluate the build stack.
    • This has helped for some users who were stuck in a quasi-cached build state. (Hugging Face Forums)

These are optional; I would not rely on them for production.


D) When to escalate to Hugging Face support

Contact HF (forum + [email protected]) when:

  • A brand-new minimal Space also stays in Building/Preparing with no logs, or
  • Multiple Spaces on your account suddenly show the same behaviour, or
  • You see messages like “Failed to load logs: Not Found” consistently, which community threads link to backend 404/registry issues. (Hugging Face Forums)

In your message, include:

  • Username and relevant Space slugs (Ark-kun/tangle, Ark-kun/tangle-staging, etc.).

  • Exact symptoms:

    • “Stuck in Building with no logs, even after Factory reset and small commits.”
  • Time window when it started.

  • Whether a brand-new Space and a hello-world Space also fail or not.

Several users in these threads report that HF staff had to intervene manually when a particular Space was stuck in a permanent “Building” state or when an account-level flag was involved. (Hugging Face Forums)


Summary for your next steps

  1. Create Ark-kun/tangle-staging.
  2. Push the current commit there and confirm it builds.
  3. If staging works → use it to update production (slug swap or blue/green).
  4. If staging is also stuck → test a hello-world Space; if that fails too, contact HF before touching your current prod Space.
1 Like