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

bug: events are not showing up in any dropdown or searches #26531

Open
1 of 3 tasks
tanmoysrt opened this issue Nov 29, 2024 · 17 comments · May be fixed by #26709
Open
1 of 3 tasks

bug: events are not showing up in any dropdown or searches #26531

tanmoysrt opened this issue Nov 29, 2024 · 17 comments · May be fixed by #26709
Labels
bug Something isn't working right

Comments

@tanmoysrt
Copy link

tanmoysrt commented Nov 29, 2024

Bug Description

We have a self-hosted posthog instance (PostHog Git SHA - 5adf41e).
In activity pages, we can see the incoming events and event types as well.

But while creating insights in dashboard, the dropdown to select event is blank.
It's happenning on the activity page's Select an event dropdown as well.

How to reproduce

  1. Go to dashboard

  2. Try to create an insight

  3. In the event selection dropdown it's showing up no events

    Screenshot 2024-11-29 at 10 49 35 AM

Additional context

  1. In our posthog instance, there are already various events, checked in data warehouse and in activity page (/project/1/activity/explore)

    Screenshot 2024-11-29 at 10 51 30 AM

  2. We have checked the API call as well, it returning blank results
    Request -

    https://<posthog_instance>/api/projects/1/event_definitions?event_type=event&search=&limit=100&offset=0
    

    Response -

    {
     "count": 0,
     "next": null,
     "previous": null,
     "results": []
    }

Debug info

  • 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: 5adf41e
  • PostHog self-hosted with Kubernetes (deprecated, see Sunsetting Kubernetes support), version/commit: [please provide]
@tanmoysrt tanmoysrt added the bug Something isn't working right label Nov 29, 2024
@kenz16
Copy link

kenz16 commented Nov 29, 2024

I face the same problem. and still struggling how to solve the issue.. please help us posthog team
Thanks in advance

Screenshot 2024-11-29 at 19 22 20

@DavidKuennen
Copy link

Having the same issue.

@SanchoKrancho
Copy link

SanchoKrancho commented Dec 3, 2024

Having the same issue too.

@harblaith7
Copy link

Lol are they gonna fix this? Product is unusable otherwise

@tooonuch
Copy link

tooonuch commented Dec 4, 2024

Having the same issue :(

@ershisan99
Copy link

Same issue for us, this didn't help: #25125

@tooonuch
Copy link

tooonuch commented Dec 5, 2024

I found a "workaround", which is a pain to implement especially if you have a lot of events, but it sort of works and allows you to create at least some insights.

  1. Go to "activity" ("explore" tab)
  2. find an event you need in the table
  3. click on three dots
  4. click on "create action from event"
  5. In the insights go to actions instead of events, use the one you just created

@pedromcunha
Copy link

Happening too for us, the workaround mentioned above works but is pretty tedious.

@tanmoysrt
Copy link
Author

tanmoysrt commented Dec 5, 2024

Thanks @ershisan99 , the solution in #25125 has worked for me.

In my docker-compose.yml file, I have added this part

property-defs-rs:
    image: ghcr.io/posthog/posthog/property-defs-rs:master
    restart: on-failure
    environment:
        DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
        KAFKA_HOSTS: 'kafka:9092'
        SKIP_WRITES: 'false'
        SKIP_READS: 'false'
        FILTER_MODE: 'opt_out'
        CAPTURE_MODE: 'events'

    depends_on:
        - db
        - kafka

Then, restart all the containers.
It hadn't added events from old data.
But, once any event are recording in activity, it's getting added in events list.

@ershisan99
Copy link

Thanks @ershisan99 , the solution in #25125 has worked for me.

In my docker-compose.yml file, I have added this part

property-defs-rs:
    image: ghcr.io/posthog/posthog/property-defs-rs:master
    restart: on-failure
    environment:
        DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
        KAFKA_HOSTS: 'kafka:9092'
        SKIP_WRITES: 'false'
        SKIP_READS: 'false'
        FILTER_MODE: 'opt_out'
        CAPTURE_MODE: 'events'

    depends_on:
        - db
        - kafka

Then, restart all the containers. It hadn't added events from old data. But, once any event are coming in activity, it's getting added in events list.

Damn, I'm really glad it worked for you, but I'm really pissed it hasn't for me. They're just not getting added no matter what, even though new events are coming through...

@tanmoysrt
Copy link
Author

tanmoysrt commented Dec 5, 2024

@ershisan99
It wasn't working for me either.

  • I have upgraded posthog to latest version using that upgrade script https://posthog.com/docs/self-host#upgrading
  • In the issue suggestion, that depends_on part was missing. Without that property-defs-rs container's process just failed because kafka isn't ready and kafka container takes significant amount of time to start working. After adding that depends_on parameter and restarting the containers, it started working.

After these two changes, it started working.

@ershisan99
Copy link

@ershisan99 It wasn't working for me either.

  • I have upgraded posthog to latest version using that upgrade script https://posthog.com/docs/self-host#upgrading
  • In the issue suggestion, that depends_on part was missing, without that property-defs-rs container's process just failed because kafka isn't ready and kafka container takes significant amount of time to start working. After adding that depends_on parameter and restarting the containers, it started working.

After these two changes, it started working.

You sir are a gentleman and a scholar!
I was missing the depends_on part, it's working just fine now.

Thanks!

@tooonuch
Copy link

tooonuch commented Dec 5, 2024

@tanmoysrt sorry to bug you, by restart - you mean docker compose up -d, or docker restart $(docker ps -q)? I assume compose, right?

@tanmoysrt
Copy link
Author

@tooonuch
I have just restarted all the containers by docker compose restart.
But after adding that part in compose, docker compose up -d also should work.

@tooonuch
Copy link

tooonuch commented Dec 5, 2024

yaaaay, it's working! Thanks to everyone and especially @tanmoysrt for helping in getting this fixed!

@ershisan99
Copy link

I wouldn't consider the issue resolve though, the docker-compose file is essentially broken and does not work as it's supposed to

@tooonuch
Copy link

tooonuch commented Dec 5, 2024

yeah, this is definitely still a bug, I guess if you upgraded the docker file would get overwritten and the issue would return, as would this one which is also fixable with a docker file mod

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants