PostHog / PostHog/posthog

Unsaved workflow fails the test

Open
#50,940 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Bug Description

Please describe.
If this affects the front-end, screenshots would be of great help.

If you are on PostHog Cloud it would be really valuable if you can share any links where the problem occurs. This speeds up our ability to troubleshoot tremendously.

How to reproduce

  1. Create a workflow from the template email for example, don't save it (not even as draft)
  2. There is a Test tab available, try to send a test email that will trigger the JS error

There is no workflow.id on this step so the JS error occurs because it will try to cast a id.toString() on the addPathComponent

https://github.com/PostHog/posthog/blob/54f9868560035d44a90c10d36d5c6175eccceba9/products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.ts#L495

Debug info
- [x] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in products/workflows/frontend/Workflows/hogflows/panel/testing/hogFlowEditorTestLogic.ts around line 495. Reproduce the issue by creating an unsaved workflow from an email template and using the Test tab to send a test email; done means the test email flow no longer throws the reported JavaScript error when the workflow has no id.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.