posthog
posthog copied to clipboard
CSV Export fails
Bug description
We're running into an issue where when we try to export our insights, we almost instantly get an error saying the import has failed.

I'm guessing this is a bug in PostHog. Is there any way we can workaround this - our data is a bit useless in PostHog if we can't export it?
How to reproduce
- Go to a dashboard
- For one of the insights, click the three dots, then click 'Export -> CSV'
- You'll then get the 'Export failed' error message
You also get it if you go into an insight, select the 'Linear' chart type, then attempt to export as a CSV. Same issue.
Environment
- [x] PostHog Cloud
- [ ] self-hosted PostHog, version/commit: please provide
Additional context
Project ID: 6642
Thank you for your bug report – we love squashing them!
Can see this error surface here https://sentry.io/organizations/posthog2/issues/3428846531/?project=1899813&query=is%3Aunresolved
Frustratingly there have been 115 in the last 30 days but not (noticed) alert
Error is invalid url {blah} No schema supplied. Perhaps you meant http://{blah}
The exported asset then doesn't have either local content or a path to exported content in object storage. So export has failed
@pauldambra So I'm right in assuming this is a PostHog bug, yes, and not something we're doing incorrectly?
@duncanmcclean yep, weirdly it works for me logged in as PostHog staff and logged in to my personal account.
So, I'm just trying to puzzle through if the exception is hiding a different error. At least two teams affected I'll link PRs here as I figure out what to change
No worries - I'll update my client. I appreciate the speedy replies!
So #11206 means the export doesn't immediately fail for you. But does still fail :/
The wrong kind of progress 🤣
Hey @duncanmcclean this should be working for you now.
The first time I tried it timed out (we've some work queued to improve experience when the CSV export takes longer than the timeout we apply) but the second time it exported fine.
I'll leave this open until you've had a chance to test and confirm.
Thanks for reporting this! Not only is it good to squash the bug but it was a really fun problem to figure out :)
Looks good for me - just waiting on my client to confirm! Thanks for fixing this so quickly!
I'll close this (to keep my GitHub queue clean 🤖) but do re-open or ping me on the community slack if you need to follow-up!
And thanks again. I'd never have spotted that bug with local testing 🙌
Hi, I'm having this exact problem - my csv files are not exporting and I get the "Export failed" message. ¿What can I do? @pauldambra
Hey @andresguerreroalvarez, it's probably a different issue since 6 months or so have passed 😊
Can you open a support ticket using https://us.posthog.com/project/19230#panel=support%3Abug%3Aanalytics
If you could include whether it's all insights or just specific ones, and any other detail you think might help that would be amazing. Thanks
Hey @pauldambra thanks for the quick reply! Just opened the ticket: 9403. Let me know if you need any additional info!
Best, Andrés