Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths don't load in Turbo mode #6934

Closed
2 of 3 tasks
mariusandra opened this issue Nov 7, 2021 · 0 comments
Closed
2 of 3 tasks

Paths don't load in Turbo mode #6934

mariusandra opened this issue Nov 7, 2021 · 0 comments
Labels
bug Something isn't working right feature/paths Feature Tag: Paths

Comments

@mariusandra
Copy link
Collaborator

mariusandra commented Nov 7, 2021

Bug description

Crash when opening paths from a saved insights list, or a dashboard. Same error both times:

2021-11-07 22 41 16

export function pageUrl(d: PathNodeData, display?: boolean): string {
    const incomingUrls = d.targetLinks
        .map((l) => l?.source?.name?.replace(/(^[0-9]+_)/, ''))
        .filter((a) => {
            try {
                new URL(a)
            } catch {
                return false
            }
            return a
        })
        .map((a) => new URL(a))
    const incomingDomains = Array.from(new Set(incomingUrls.map((url) => url.origin)))

    console.log(d)
    // the next line crashes
    let name = d.name.replace(/(^[0-9]+_)/, '')

    if (!display) {
        return name
    }

Logging d shows the name contains the object itself.

image

Where does that come from?

Expected behavior

The page should just open

How to reproduce

  1. Enable turbo mode
  2. Click on a path from the saved insights or any dashboard scene
  3. Kaboom

Environment

  • PostHog Cloud
  • self-hosted PostHog (ClickHouse-based), version/commit: please provide
  • self-hosted PostHog (Postgres-based, legacy), version/commit: please provide

Additional context

Reloading makes the insight appear, so not a P0, but should be fixed nevertheless..

Thank you for your bug report – we love squashing them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right feature/paths Feature Tag: Paths
Projects
None yet
Development

No branches or pull requests

2 participants