covid-vaccine-spotter icon indicating copy to clipboard operation
covid-vaccine-spotter copied to clipboard

zip code / distance not working, at least not in CO

Open devonjones opened this issue 5 years ago • 14 comments

When I filter or not, I get the same results, none within my radius. I'm wondering if there's a bug where it shows all appointments if none are available within your range.

devonjones avatar Mar 22 '21 16:03 devonjones

Do you have an example of a zip code that this is happening for? I just entered 80828 and I received the expected message. Also, what radius are you using?

patrickdemers6 avatar Mar 22 '21 23:03 patrickdemers6

https://www.vaccinespotter.org/CO/index.html?zip=80238&radius=10&include_all=false so 80238, 10 miles

No appointment in the list is within even like 25 miles.

Walmart - 2881 North Ave, Grand Junction, CO 81501 shows up on the list, it is 251 miles from 80238:

https://www.google.com/maps/dir/Denver,+CO+80238/Walmart+Supercenter,+2881+North+Ave,+Grand+Junction,+CO+81501/@39.0844308,-107.2531386,9z/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0x876c7b104b6cb589:0x19d838806c69f08!2m2!1d-104.8746508!2d39.7781333!1m5!1m1!1s0x87471e9f3f8ab6fb:0x1f6dba917ed0fe0c!2m2!1d-108.51902!2d39.0753555!3e0

devonjones avatar Mar 23 '21 00:03 devonjones

I have the same issue in FL. It may be happening intermittently. But right now, for example, zip code 33712 w/ radius of 25 miles returns results from Jacksonville (248 miles away).

jakebraun avatar Mar 23 '21 02:03 jakebraun

I am also having the same issue. Zip 80303, any radius I seem to choose.

scotthue avatar Mar 23 '21 04:03 scotthue

Same issue as user scotthue. zip code: 80303

krittger avatar Mar 23 '21 20:03 krittger

If I try "80828" in CO, I have 25 results no matter what radius I change it to. I'm assuming this means it's just not filtering at all.

I had the same problem in NC, which is why I came here to report it, but then I saw this existing issue. If I put "27539" and a 5 mile radius, one of the first things listed is over 300 miles from me in the mountains of Western NC.

RangerRick avatar Mar 23 '21 21:03 RangerRick

I'm going to try digging into this issue tonight as it's obviously very relevant. @GUI can we tag this as bug?

patrickdemers6 avatar Mar 23 '21 21:03 patrickdemers6

Ah, actually @devonjones's example helps. I believe this happens whenever you load the page with /index.html in the path, but it does not happen when /index.html is not included. So:

  • Working: https://www.vaccinespotter.org/CO/?zip=80238&radius=5
  • Broken: https://www.vaccinespotter.org/CO/index.html?zip=80238&radius=5

The map is also broken when /index.html is included, which explains other bug reports I've received about weird things.

I suspect this is somehow related to Nuxt/Vue's routing and not being aware of index.html being possibly included in the URL route. I haven't dug into this, so not sure if this is just a configuration issue, but I think this at least a lead that explain all of this. I'll also try to poke around this, but if anyone else beats me to it, help is always welcome! Thanks all!

GUI avatar Mar 23 '21 21:03 GUI

Thanks for the insight! That definitely gets me in the right direction.

patrickdemers6 avatar Mar 23 '21 21:03 patrickdemers6

I can confirm that this* URL is working properly for me, and I was having issues in the past. I cannot confirm what URL I used yesterday when I had issues.

*working url: https://www.vaccinespotter.org/CO/?zip=80303&radius=100

scotthue avatar Mar 23 '21 21:03 scotthue

I'm unable to even get a page with index.html to load on localhost. Nuxt is letting me know "This page could not be found." Can anyone else confirm this behavior?

I was trying to access: http://localhost:3000/CO/index.html

patrickdemers6 avatar Mar 23 '21 21:03 patrickdemers6

As a quick and dirty potential fix, I've added a server-side redirect to so that navigating to https://www.vaccinespotter.org/CO/index.html?zip=80238&radius=5 will redirect you to https://www.vaccinespotter.org/CO/?zip=80238&radius=5. So assuming that "index.html" was the issue, I think this might fix it. But if anyone else can still reproduce this issue, that would be great to know!

The underlying issue with Vue/Nuxt is still a little weird (but I guess it also makes sense), but if this redirect solves things, we may not really need to address it. I found this thread about the issue with Nuxt: https://www.reddit.com/r/Nuxt/comments/gzwrqu/visiting_generated_site_routes_with_trailing/ At least based on that quick thread, the solution doesn't seem quite so simple in Nuxt itself (although he alias config looks like it could solve it), so server-side redirects may actually be the most straightforward solution.

GUI avatar Mar 23 '21 21:03 GUI

I'm unable to even get a page with index.html to load on localhost. Nuxt is letting me know "This page could not be found." Can anyone else confirm this behavior?

I was trying to access: http://localhost:3000/CO/index.html

@patrickdemers6: Yeah, I think this gets into some confusing differences between Nuxt's development server, which doesn't support /index.html and how things work when the site is built and deployed to a static site hosting, where the files get deployed as /index.html files. You could probably reproduce it via yarn run generate && yarn run start (which serves up the built file more like on what happens in the production environment). But like I mentioned above, the redirect I added via Cloudflare may actually solve this in sort of a roundabout way.

GUI avatar Mar 23 '21 21:03 GUI

Thanks, I'll give that a shot. I think the redirect seems to have fixed the issue!

Although technically it may be good to address the root of the problem, I believe moving forward to other enhancements would be a better use of development time.

patrickdemers6 avatar Mar 23 '21 21:03 patrickdemers6