UrbanInstitute / ui-equity-tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Your file is not a CSV" error

vgXhc opened this issue · comments

When trying to use my own data, I get a "Your file is not a CSV" error.

Steps to reproduce

  1. Click "Upload your own data" button
  2. Select properly formatted csv file
  3. Error message pops up

image

I tried it with my own csv file, but the error also occurs with the sample Minneapolis bike share csv file. I'm using Windows and can reproduce the error in Firefox, Chrome, and Edge. Running the analysis on the sample data via the "Use sample data" button works.

I am not able to replicate on my desktop (Ubuntu Chrome/ Ubuntu Firefox) as the Minneapolis bike share csv uploads correctly. However I am able to replicate on my phone using the Minneapolis link above (Android 10 Firefox and Android 10 Chrome). @alenastern was not able to replicate either on desktop (Windows Chrome / Edge) or on mobile (iOS Safari). @vgXhc any chance you could look at the developer console on the broswer and paste any console errors you see? @bchartoff any idea what's going on here?

Not seeing anything obvious in the console.

Some cookies are misusing the recommended “SameSite“ attribute 4

Loading failed for the <script> with source “https://connect.facebook.net/en_US/fbevents.js”. index.html:1:1

Some cookies are misusing the recommended “SameSite“ attribute 16

Request to access cookie or storage on “https://googleads.g.doubleclick.net/pagead/viewthroughconversion/1067287040/?random=1603488953322&cv=9&fst=1603488953322&num=1&label=Remarketing&guid=ON&resp=GooglemKTybQhCsO&u_h=720&u_w=1280&u_ah=720&u_aw=1280&u_cd=24&u_his=8&u_tz=-300&u_java=false&u_nplug=0&u_nmime=0&gtm=2wgae1&sendb=1&ig=0&frm=0&url=https%3A%2F%2Fapps.urban.org%2Ffeatures%2Fequity-data-tool%2Findex.html&tiba=Spatial%20Equity%20Data%20Tool&hn=www.google.com&async=1&rfmt=3&fmt=4” was blocked because it came from a tracker and content blocking is enabled.

The resource from “https://analytics.twitter.com/i/adsct?type=javascript&version=1.1.0&p_id=Twitter&p_user_id=0&txn_id=nw6de&events=%5B%5B%22pageview%22%2Cnull%5D%5D&tw_sale_amount=0&tw_order_quantity=0&tw_iframe_status=0&tpx_cb=twttr.conversion.loadPixels&tw_document_href=https%3A%2F%2Fapps.urban.org%2Ffeatures%2Fequity-data-tool%2Findex.html%23” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). index.html

Loading failed for the <script> with source “https://analytics.twitter.com/i/adsct?type=javascript&version=1.1.0&p_id=Twitter&p_user_id=0&txn_id=nw6de&events=%5B%5B%22pageview%22%2Cnull%5D%5D&tw_sale_amount=0&tw_order_quantity=0&tw_iframe_status=0&tpx_cb=twttr.conversion.loadPixels&tw_document_href=https%3A%2F%2Fapps.urban.org%2Ffeatures%2Fequity-data-tool%2Findex.html%23”. index.html:1:1

I guess I don't know how the detection of a valid CSV is done, but for testing purposes I chose a very large csv, and the error popped up instantaneously -- clearly faster than the file could have been uploaded.

I also tried replicating the error on a Macbook with Chrome and it would not replicate.

@vgXhc we've just added some additional error messages on the console. Could you try again and paste the console errors you are getting? I'm trying to do the same on my phone, but Android remote debugging is a real pain...

I think we managed to figure it out! It was a MIME type issue that is resolved for me after we expanded the allowed MIME types for the upload. I'm going to close this now, but @vgXhc please reopen if you're still having issues!

Sorry, haven't had time to look back into this until now. I unfortunately must report that nothing has changed here. Still not working on my desktop (and debug output looks the same), and I also just tried it on my Android phone on FF and get the same behavior. I guess I'm not totally sure I'm doing the debugging correctly -- happy to take suggestions and do further testing.

Additional things I have tried:

  • Testing on two remote machines (Windows/FF): Website works
  • delete cache/website data for page: no difference
  • start FF in safe mode: no difference
  • access site via VPN: no difference
  • remove file type association for csv files: no difference

If you think this is some quirk on my end and doesn't affect others, I'm happy to let this go, as I can just use a different machine to access the tool. But I guess the fact that I can reproduce it both on my desktop and phone may indicate others may be having issues as well.