Skip to content

Template build stuck at file copy #1018

@quincyqu

Description

@quincyqu

Describe the bug
I'm using python SDK building custom template with e2b cloud (free tier). It stuck at one step like for an hour:

[2025-11-08T07:40:59.120903+00:00] [info] CACHED [builder 46/66] COPY path/to/file /app/path/to/file   [...]

then error without much information:

... in wait_for_build_finish
    raise BuildException(build_status.reason or "Build failed")

e2b.template.exceptions.BuildException: BuildStatusReason(message='polling received unrecoverable error: rpc error: code = DeadlineExceeded desc = context deadline exceeded', step=<e2b.api.client.types.Unset object at 0x7fa2c88d3800>, additional_properties={})

Retry doesn't work. The error persisted with my current e2b cloud account and API key, it stuck on the exact same step almost every time (happens on other step as well).

Some other observations on caching for context:
The template caching is enabled.
I changed to use another account api key, the same code / template builds and upload successfully.
Not sure if cacheing is the one to blame, but clearly changing account gets it a fresh start without caching. It builds slower but it succeeded.

And the question:

  • How does template caching work on e2b cloud?
  • A way to clear cache?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Browser console output
Console logs from your browser's developer tool console.

Terminal commands & output
Commands you used to start the app and the terminal output.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions