oleander-whirlwind
10/08/2025, 7:56 AMMarvin
10/08/2025, 7:57 AMMarvin
10/08/2025, 8:01 AM@task-decorated calls, Prefect doesn’t have a task DAG to render. You’ll still see logs/states, but the graph will be empty.
- You’re on a different tab: On the flow run page, switch to the “Graph” tab. Your link shows `?tab=Logs`; the graph is on its own tab.
- Browser extensions interfering: Ad/tracker blockers can prevent the graph from rendering. Try an incognito window or disabling extensions for localhost.
- Older UI version: If you’re on an older Prefect release, a UI bug could be at play. Try upgrading to the latest Prefect and restarting the server/UI.
Quick check with a minimal example (should produce a simple two-node graph):
from prefect import flow, task
@task
def add_one(x: int) -> int:
return x + 1
@task
def multiply_two(y: int) -> int:
return y * 2
@flow
def my_flow():
a = add_one(1)
b = multiply_two(a)
return b
if __name__ == "__main__":
my_flow()
If the graph is still blank:
- Confirm your Prefect version (prefect version) and that you’re using Prefect 3.x.
- Open your browser dev tools (Network tab) and check the request to the flow run graph endpoint (e.g., /api/flow_runs/<id>/graph). If it returns an empty graph or an error, that points us to the root cause.
- Share a small snippet of your flow showing how tasks are defined/called.
- Try a different browser or incognito to rule out extensions.
Notes and references:
- There’s no special setting to enable the flow graph in the UI; it should appear when tasks are present in the run.
- The Python-side flow.visualize() utility (for generating static diagrams) is a separate feature and may require Graphviz, but that’s not needed for the UI’s live graph.
- Some related internals and schemas (for the run graph data) are documented here:
- Graph schema
- UI schemas
If you can share:
- Prefect version output
- A small example of your flow code
- Whether the “Graph” tab (not just Logs) is blank
- Any errors from the browser console/Network tab
…I can help pinpoint what’s going on.oleander-whirlwind
10/08/2025, 8:16 AMMarvin
10/08/2025, 8:16 AMMarvin
10/08/2025, 8:19 AMdocker pull prefecthq/prefect:3.4.22
- Run your server with that image and restart. After it starts, confirm the UI footer shows 3.4.22 (or newer).
2) Hard refresh your browser or try an incognito window to bypass any cached UI assets.
3) If the Graph tab still doesn’t appear after upgrading, check the flow-run graph API response in your browser:
- Open DevTools → Network
- Load the flow run page and look for a request like /api/flow_runs/<flow_run_id>/graph
- If that endpoint returns data but the tab is missing, that’s likely a UI bug and we can file an issue.
- Graph schema docs (for reference):
- Flow run graph schema
- UI schemas
Notes
- The UI graph does not require Graphviz; that’s only for the Python-side flow.visualize() utility.
- No environment flag is needed beyond running the UI (prefect server start --ui is on by default).
If you want, share how you’re starting the Docker container (command or compose) and I can double-check the setup. Once you’re on 3.4.22+ you should see the Graph tab on the flow run page, and your @task-based flow will render there.oleander-whirlwind
10/08/2025, 8:22 AMMarvin
10/08/2025, 8:22 AMMarvin
10/08/2025, 8:23 AMwebgl.disabled is false; as a temporary test you can set webgl.force-enabled to true
- The message WebglAllowWindowsNativeGl:false suggests a policy/setting blocking native GL; in about:config you may need to allow it or have IT adjust policy
- Try a different browser/machine or an Incognito/Private window to rule out extensions
- If you’re on Windows via RDP/VM, GPU acceleration may be disabled:
- Some RDP/VM setups block WebGL; enabling “Use hardware graphics adapter” or using a local session often fixes it
- Ensure the VM has 3D acceleration enabled
Also, since your server UI is 3.4.19 and your dev env is 3.4.22, I still recommend upgrading the server/UI image to 3.4.22+ to ensure you have the latest UI:
docker pull prefecthq/prefect:3.4.22
Then restart the server and confirm the UI footer shows 3.4.22.
Notes and references
- The graph in the UI does not require Graphviz; it needs WebGL in your browser.
- If you need a stopgap, you can still generate a static diagram from Python with flow.visualize() (requires Graphviz):
- Visualization utilities
- Flow run graph schema (what the UI consumes): Graph schema
If you can share:
- Browser and version, OS, and whether you’re in a VM/RDP session
- Results of the WebGL tests
…I can give more targeted steps.