posthog icon indicating copy to clipboard operation
posthog copied to clipboard

CSV Export fails

Open duncanmcclean opened this issue 3 years ago • 6 comments
trafficstars

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.

image

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

  1. Go to a dashboard
  2. For one of the insights, click the three dots, then click 'Export -> CSV'
  3. 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!

duncanmcclean avatar Aug 09 '22 11:08 duncanmcclean

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

pauldambra avatar Aug 09 '22 12:08 pauldambra

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 avatar Aug 09 '22 12:08 pauldambra

@pauldambra So I'm right in assuming this is a PostHog bug, yes, and not something we're doing incorrectly?

duncanmcclean avatar Aug 09 '22 12:08 duncanmcclean

@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

pauldambra avatar Aug 09 '22 12:08 pauldambra

No worries - I'll update my client. I appreciate the speedy replies!

duncanmcclean avatar Aug 09 '22 12:08 duncanmcclean

So #11206 means the export doesn't immediately fail for you. But does still fail :/

The wrong kind of progress 🤣

pauldambra avatar Aug 10 '22 09:08 pauldambra

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 :)

pauldambra avatar Aug 10 '22 20:08 pauldambra

Looks good for me - just waiting on my client to confirm! Thanks for fixing this so quickly!

duncanmcclean avatar Aug 11 '22 06:08 duncanmcclean

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 🙌

pauldambra avatar Aug 12 '22 08:08 pauldambra

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

andresguerreroalvarez avatar Jan 16 '24 18:01 andresguerreroalvarez

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

pauldambra avatar Jan 16 '24 18:01 pauldambra

Hey @pauldambra thanks for the quick reply! Just opened the ticket: 9403. Let me know if you need any additional info!

Best, Andrés

andresguerreroalvarez avatar Jan 16 '24 18:01 andresguerreroalvarez