<@ULVA73B9P> when i run a flow and go into the ui ...
# ask-marvin
o
@Marvin when i run a flow and go into the ui with the browser i see at a run http://localhost:4200/runs/flow-run/8f1d8ee8-3a92-4ac8-8c92-e8b8d0f910fb?tab=Logs i do not not see the flow graph or any bvisualisation, the panel stays blank. is there anything to configure to actuvate the flow graph?
m
thought for 239.6 seconds
Short answer: there’s nothing you need to “turn on” — the flow graph renders automatically in the UI when Prefect can infer a task graph from your run. Common reasons the graph panel appears blank: - No tasks in the flow: If your flow body is just plain Python without any
@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):
Copy code
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.
o
@Marvin there is no graph tab. my prefect version is latest docker prefecthq/prefect:3-latest. in the browser it says 3.4.19. my dev environment uses prefect 3.4.22, also my flow has several @tasks but no graph for my flow.
m
thought for 135.8 seconds
Thanks for the details — that helps. There’s nothing to configure to “activate” the flow graph; it’s part of the UI. If you don’t see a Graph tab at all on the flow run page, that’s almost always a UI version issue. What’s happening - Your server/UI is 3.4.19 (from the Docker image). In that build, the Graph tab is not present. - Your dev environment is 3.4.22. The Graph tab is available in newer 3.4.x releases. - Mismatched versions are fine for orchestration, but UI features depend on the server/UI version. What to do 1) Upgrade your server/UI to match or exceed 3.4.22 - Pull a specific tag (to avoid a cached “3-latest”):
Copy code
docker 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.
o
@Marvin in the console i find Uncaught (in promise) Error: Unable to auto-detect a suitable renderer. ailed to create WebGL context: WebGL creation failed: * WebglAllowWindowsNativeGl:false restricts context creation on this system. () * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS) index-DjDBGSho.js4701016 Failed to create WebGL context: WebGL creation failed: * WebglAllowWindowsNativeGl:false restricts context creation on this system. () * Exhausted GL driver options. (FEATURE_FAILURE_WEBGL_EXHAUSTED_DRIVERS) could this be related to the non present graphs?
m
thought for 40.2 seconds
Yes — that console error explains the missing graph. The flow graph view relies on a WebGL-based renderer. If your browser can’t create a WebGL context, the graph component can’t initialize and the panel/tab will remain blank or not appear. What to try - Verify WebGL works in your browser: - Open WebGL 1 test and WebGL 2 test. If these don’t render, the Prefect graph won’t either. - Enable hardware acceleration and WebGL: - Chrome/Edge - Settings > System > “Use hardware acceleration when available” ON - Restart the browser - Visit chrome://gpu (or edge://gpu) and check that “WebGL” is “Hardware accelerated” - Firefox - Settings > General > Performance > “Use recommended performance settings” ON, and “Use hardware acceleration when available” ON - If still blocked, in about:config ensure
webgl.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:
Copy code
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.