PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.74k stars 1.16k forks source link

TypeError: el.attr__class?.split is not a function when importing events #12106

Open allan-simon opened 1 year ago

allan-simon commented 1 year ago

Bug description

When checking the logs of the "plugins" docker I can see a lot of

4a-0000-924d-995fe0266815 
2022-10-05T10:07:25.715Z [info] (___2) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-4612-0000-f9f9-46077dca1dd4 
2022-10-05T10:07:26.064Z [info] (___1) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-4770-0000-c0f4-21079620ba8a 
2022-10-05T10:07:26.078Z [info] (___1) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-477e-0000-5b7e-0817c4374bb7 
2022-10-05T10:07:26.147Z [info] (___1) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-47c3-0000-7fb5-9d3e56fbd875 
2022-10-05T10:07:26.153Z [info] (___1) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-47c9-0000-2244-6219e4fddede 
2022-10-05T10:07:26.163Z [info] (___1) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-47d3-0000-8ebc-c41d28ff8c94 
2022-10-05T10:07:26.665Z [info] (___2) 🔔 TypeError: el.attr__class?.split is not a function [/code/plugin-server/dist/worker/ingestion/event-pipeline/runner.js:140] logId=0183a79d-49c8-0000-7d8f-f661a45385b1 

How to reproduce

unfortunately I don't know how to reproduce

Environment

Additional context

I'm trying to import back some event from an old instance on 1.31.1 using the migrator 3000

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

allan-simon commented 1 year ago

note: it seems to be only some specific events (as I can see most of them, but as there's a lot of them , hard to pin point which are missing )

benjackwhite commented 1 year ago

I believe the migrator plugin had some issues around autocapture events as there is some back and forth to reverse the processing. Is this still an issue or is it solved by chance?

allan-simon commented 1 year ago

unfortunately no, and it seems other stuff get messed up during the migration, so we decided to do a clean install.

tiina303 commented 8 months ago

The plan here is that we'll send elements_chain directly, which ingestion already handles well similar to what's done in https://github.com/PostHog/posthog-migration-tools/blob/main/migrate.py