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

Downloading open data files does not work properly or does not work at all #12752

Open
NoOPeEKS opened this issue Apr 25, 2024 · 0 comments
Open

Comments

@NoOPeEKS
Copy link

NoOPeEKS commented Apr 25, 2024

Describe the bug

When I click the link on the footer of my Decidim webpage, it downloads the usual 7 CSV files, but they appear to have no information at all. Their size in bytes is of 1 and when I open every one of them separately, they are all blank with no trace of any information ever being written... I have published some processes, conferences and added a proposals component to a process and made some proposals to see if that data gets inserted into the csv, but it's not. I've also executed the command bundle exec rake decidim:open_data:export to generate those files before each download, but it seems it did not have any effect. When I tried to restart the server (I am running my whole environment in docker with docker swarm and docker stack), the button does not download anything anymore but instead raises an HTTP 404 Error.

To Reproduce

  1. Go to the webpage footer
  2. Click on Download Open Data files
  3. Inspect the downloaded CSV files
  4. See that they are all empty

or

  1. Go to the webpage footer
  2. Click on Download Open Data files
  3. Get a 404 HTTP Error

Expected behavior

It should download CSV with some data on them, but not empty or not throw an HTTP 404 Error.

Screenshots

No response

Stacktrace

This stacktrace is when I restarted the server (using a local volume of the database that was previously used) using docker stack deploy and got the 404 Error. Previously to restarting the server it downloaded something, at least.

I, [2024-04-25T10:20:04.630353 #1]  INFO -- : [83734214-8ffd-4401-a5a5-6ede6d946c98] Started GET "/open-data/download?locale=en" for 10.0.0.2 at 2024-04-25 10:20:04 +0000
I, [2024-04-25T10:20:04.635442 #1]  INFO -- : [83734214-8ffd-4401-a5a5-6ede6d946c98] Processing by Decidim::OpenDataController#download as HTML
I, [2024-04-25T10:20:04.635496 #1]  INFO -- : [83734214-8ffd-4401-a5a5-6ede6d946c98]   Parameters: {"locale"=>"en"}
I, [2024-04-25T10:20:04.645862 #1]  INFO -- : [83734214-8ffd-4401-a5a5-6ede6d946c98] Redirected to https://decidim.eurecatprojects.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c4bd4361551514e8bf885cbe2e5e261afc11e6/decidim.eurecatprojects.com-open-data.zip
I, [2024-04-25T10:20:04.646171 #1]  INFO -- : [83734214-8ffd-4401-a5a5-6ede6d946c98] Completed 302 Found in 11ms (ActiveRecord: 2.5ms | Allocations: 3061)
I, [2024-04-25T10:20:04.721528 #1]  INFO -- : [507c35f9-8458-4065-82d8-dd6a066670de] Started GET "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c4bd4361551514e8bf885cbe2e5e261afc11e6/decidim.eurecatprojects.com-open-data.zip" for 10.0.0.2 at 2024-04-25 10:20:04 +0000
I, [2024-04-25T10:20:04.726521 #1]  INFO -- : [507c35f9-8458-4065-82d8-dd6a066670de] Processing by ActiveStorage::Blobs::RedirectController#show as ZIP
I, [2024-04-25T10:20:04.726588 #1]  INFO -- : [507c35f9-8458-4065-82d8-dd6a066670de]   Parameters: {"signed_id"=>"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c4bd4361551514e8bf885cbe2e5e261afc11e6", "filename"=>"decidim.eurecatprojects.com-open-data"}
I, [2024-04-25T10:20:04.728332 #1]  INFO -- : [507c35f9-8458-4065-82d8-dd6a066670de] Redirected to https://decidim.eurecatprojects.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhiMjg1TTNrM01XbDJZek5zYm1kbmVYWXdOR2x2TW04MlpUUTVNd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpQVh4aGRIUmhZMmh0Wlc1ME95Qm1hV3hsYm1GdFpUMGlaR1ZqYVdScGJTNWxkWEpsWTJGMGNISnZhbVZqZEhNdVkyOXRMVzl3Wlc0dFpHRjBZUzU2YVhBaU95Qm1hV3hsYm1GdFpTbzlWVlJHTFRnbkoyUmxZMmxrYVcwdVpYVnlaV05oZEhCeWIycGxZM1J6TG1OdmJTMXZjR1Z1TFdSaGRHRXVlbWx3QmpzR1ZEb1JZMjl1ZEdWdWRGOTBlWEJsU1NJVVlYQndiR2xqWVhScGIyNHZlbWx3QmpzR1ZEb1JjMlZ5ZG1salpWOXVZVzFsT2dwc2IyTmhiQT09IiwiZXhwIjoiMjAyNC0wNC0yNVQxMDoyNTowNC43MjdaIiwicHVyIjoiYmxvYl9rZXkifX0=--7352f11488b60955827a6c8897d3a4efb3c5dc13/decidim.eurecatprojects.com-open-data.zip
I, [2024-04-25T10:20:04.728455 #1]  INFO -- : [507c35f9-8458-4065-82d8-dd6a066670de] Completed 302 Found in 2ms (ActiveRecord: 0.3ms | Allocations: 557)
I, [2024-04-25T10:20:04.812732 #1]  INFO -- : [471e63ce-11d6-4dac-bcbf-915ef9abf903] Started GET "/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhiMjg1TTNrM01XbDJZek5zYm1kbmVYWXdOR2x2TW04MlpUUTVNd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpQVh4aGRIUmhZMmh0Wlc1ME95Qm1hV3hsYm1GdFpUMGlaR1ZqYVdScGJTNWxkWEpsWTJGMGNISnZhbVZqZEhNdVkyOXRMVzl3Wlc0dFpHRjBZUzU2YVhBaU95Qm1hV3hsYm1GdFpTbzlWVlJHTFRnbkoyUmxZMmxrYVcwdVpYVnlaV05oZEhCeWIycGxZM1J6TG1OdmJTMXZjR1Z1TFdSaGRHRXVlbWx3QmpzR1ZEb1JZMjl1ZEdWdWRGOTBlWEJsU1NJVVlYQndiR2xqWVhScGIyNHZlbWx3QmpzR1ZEb1JjMlZ5ZG1salpWOXVZVzFsT2dwc2IyTmhiQT09IiwiZXhwIjoiMjAyNC0wNC0yNVQxMDoyNTowNC43MjdaIiwicHVyIjoiYmxvYl9rZXkifX0=--7352f11488b60955827a6c8897d3a4efb3c5dc13/decidim.eurecatprojects.com-open-data.zip" for 10.0.0.2 at 2024-04-25 10:20:04 +0000
I, [2024-04-25T10:20:04.817781 #1]  INFO -- : [471e63ce-11d6-4dac-bcbf-915ef9abf903] Processing by ActiveStorage::DiskController#show as ZIP
I, [2024-04-25T10:20:04.817839 #1]  INFO -- : [471e63ce-11d6-4dac-bcbf-915ef9abf903]   Parameters: {"encoded_key"=>"[FILTERED]", "filename"=>"decidim.eurecatprojects.com-open-data"}
I, [2024-04-25T10:20:04.818358 #1]  INFO -- : [471e63ce-11d6-4dac-bcbf-915ef9abf903] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms | Allocations: 180)

Extra data

  • Device: AWS EC2
  • Device OS: Amazon Linux
  • Browser: Firefox
  • Decidim Version: 0.28.0

Additional context

The GraphQL API with GraphiQL does retrieve the processes and proposals data. When restarted the server which is running in docker, the download button no longer worked and returned a 404 status code for the request.

@NoOPeEKS NoOPeEKS changed the title Downloading open data files does not work properly Downloading open data files does not work properly or does not work at all Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant