CodeforAustralia / school-finder

:eyes: Find schools by location
https://education.nsw.gov.au/school-finder
GNU General Public License v3.0
17 stars 7 forks source link

Intake areas disappearing in certain situations #360

Closed richard-walsh closed 6 years ago

richard-walsh commented 6 years ago

To reproduce, load Sylvania Public School using it's school code. https://education.nsw.gov.au/school-finder/index?school_code=3143

Notice that the Intake Area loads, then disappears after the initial zoom. Zooming in or out manually will make the area reappear.

Rustuma commented 6 years ago

Hi Richard - seems to be IE only. Works in Chrome. I will get @reekypete to have a look

richard-walsh commented 6 years ago

Thanks Rustuma, I'm getting the issue in Chrome as well, Version 66.0.3359.139 (Official Build) (64-bit).

Rustuma commented 6 years ago

That's weird, I'm using the same version. We will check on a few machines here. I don't like inconsistency! Rustum

techieshark commented 6 years ago

@richard-walsh heya. This sounds like a weird one.

I'm on Chrome 66.0.3359.170 (Official Build) (64-bit) and seeing this:

image

Might help if you can post a screenshot, and also check the chrome (or IE) JS console to see if any errors are reported. I can't think of what would cause this.

reekypete commented 6 years ago

I also can't reproduce on Chrome 66.0.3359.139 (Official Build) (64-bit) AND can't reproduce on IE 11.0.9600.18952 (and, for what it's worth, can't reproduce on Firefox Developer edition V61.04b)

Yes please to @techieshark's suggestion re: browser versions and console logs

reekypete commented 6 years ago

OK, I take it back. Now, for some reason, I can reproduce in both Chrome and IE. @Rustuma can too. Weird. Nothing in the console. Network traffic is all 200 OKs.

techieshark commented 6 years ago

Weird as. I tried it on FF and Safari but still works. Also tried in private mode so to avoid cache issues.

richard-walsh commented 6 years ago

Yeah it's not consistent. There was a point where I thought it was working fine on 32-bit versions of Chrome (as it was consistently working on one machine) but eventually one reload showed it not working.

Here's a video showing the issue in Chrome Version 66.0.3359.181 (Official Build) (64-bit). https://youtu.be/jJ8MWiLm_ag

The only console error is a mixed content warning, unlikely to be related. "Mixed Content: The page at 'https://education.nsw.gov.au/school-finder/index?school_code=3143' was loaded over HTTPS, but requested an insecure image 'http://i62.tinypic.com/15xvbd5.png'. This content should also be served over HTTPS."

techieshark commented 6 years ago

@richard-walsh a video! Even more helpful. That helped me see the issue seems to only occur if you are already on the school, and then click 'refresh'.

Can you confirm? If you open a new, blank tab, and paste in that URL, do you see the same behavior?

techieshark commented 6 years ago

Hmm. Also starting from fresh tab but with console open may cause this too.

richard-walsh commented 6 years ago

If I open up a new incognito window it seems to work the first time, but then refreshing or opening it in a new tab does not work. But closing the window and opening a new incognito window does work.

techieshark commented 6 years ago

Is it just that school or are there other school codes which result in the same behavior?

reekypete commented 6 years ago

@Rustuma and I have also observed the problem when searching for the school the (ahem) old-school way, so definitely not specific to "already on a school"

richard-walsh commented 6 years ago

Multiple schools, I just randomly chose this school as a test. (I initially noticed the issue on the SA school finder, but figured a NSW example would be more useful here)

techieshark commented 6 years ago

Does this problem persist for either/both of you if you change the 'app.config.geoProvider' from 'google' to 'mapbox'?

Setting is here: https://github.com/CodeforAustralia/school-finder/blob/master/js/config.js#L69

richard-walsh commented 6 years ago

It appears to work correctly when using mapbox as the geo provider.

richard-walsh commented 6 years ago

I have made some progress. The issue only occurs after Google Maps JavaScript API v3.31. A new renderer and basemap were implemented in v3.32. See: https://developers.google.com/maps/documentation/javascript/new-renderer (The troubleshooting section may suggest a place to start looking for a longer term fix)

Short term fix is to add &v=3.31 to your maps API script (to use the old renderer, which will no longer be available as of August 2018). eg. Githubissues.

  • Githubissues is a development platform for aggregating issues.