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

Intake areas disappearing in certain situations #360

Closed
richard-walsh opened this issue May 18, 2018 · 26 comments · May be fixed by #361
Closed

Intake areas disappearing in certain situations #360

richard-walsh opened this issue May 18, 2018 · 26 comments · May be fixed by #361

Comments

@richard-walsh
Copy link

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
Copy link
Collaborator

Rustuma commented May 18, 2018

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

@richard-walsh
Copy link
Author

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

@Rustuma
Copy link
Collaborator

Rustuma commented May 18, 2018

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

@techieshark
Copy link
Contributor

@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
Copy link
Collaborator

reekypete commented May 18, 2018

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
Copy link
Collaborator

reekypete commented May 18, 2018

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
Copy link
Contributor

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

@richard-walsh
Copy link
Author

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
Copy link
Contributor

@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
Copy link
Contributor

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

@richard-walsh
Copy link
Author

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
Copy link
Contributor

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

@reekypete
Copy link
Collaborator

@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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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

@richard-walsh
Copy link
Author

richard-walsh commented May 22, 2018

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. <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&v=3.31">

@techieshark
Copy link
Contributor

@richard-walsh that's great news! Thanks for sharing that workaround.

It looks like Carto is aware of this as well:

CartoDB/carto.js@81cf5bd

CartoDB/carto.js#2067

So I would expect this will get figured out by August.

@ivanmalagon
Copy link

ivanmalagon commented Jun 5, 2018

Hello. Ivan from CARTO here.

We fixed the disappearing layers with Google Maps in cartodb.js v3.15.15

I see in the attached page that you're using a very old version (v3.12.16) Please, use the latest one and check if the bug is out.

You can find the latest version at http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js

@techieshark
Copy link
Contributor

Thanks for that update @ivanmalagon!

@richard-walsh
Copy link
Author

richard-walsh commented Jun 12, 2018

I initially thought that cartodb.js v3.15.15 fixed the issue.
But I've found a situation where it doesn't (now running v3.15.16):
Latest gmaps and cartodb.js v3.15

Gmaps v3.31 for comparison:
Gmaps v3.31 and latest cartodb.js v3.15

@ivanmalagon
Copy link

Where is happening, @richard-walsh ? What system do you run it in? What's supposed to appear?

I'm seeing both maps equal, so I'd need more info, please.

@richard-walsh
Copy link
Author

Sorry @ivanmalagon I should have included more info.

OS: Windows 7
Browser: Google Chrome Version 67.0.3396.79 (Official Build) (64-bit)

The issue is intermittent, usually only occurring when refreshing the page.
The first link should show the orange zone disappearing when the page is refreshed, the second link should work correctly (with gmaps v3.31).

@techieshark
Copy link
Contributor

Interesting. Yeah I'm seeing the same issue (carto .pngs not being overlaid atop google maps layers) when viewing this URL:

https://educationsa.govcms.gov.au/sites/g/files/net691/themes/site/ReleaseTwoTheme/school-finder-for-SA-v8_6/index.html?skip_terms=true&school_code=1022&year=2018&debug=true

(and maybe refreshing), on latest Chrome (67.0.3396.79 (Official Build) (64-bit)) on OS X.

It seems there may be a difference based on whether images (like Google maps tiles) come from cache or not -

With cache disabled, gmaps tiles load second:

image

With cache enabled, gmaps tiles load first:
image

@ivanmalagon
Copy link

Can you test it again @techieshark ? We didn't reproduce this exact case but we've made a change that could be related.

Thanks.

@richard-walsh
Copy link
Author

I haven't found any issues with the latest update, thanks @ivanmalagon

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

Successfully merging a pull request may close this issue.

5 participants