Bug 177482 - hightide.earth doesn't load in Safari 11 sometimes
Summary: hightide.earth doesn't load in Safari 11 sometimes
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.12.4
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-26 03:45 PDT by Brian Cardarella
Modified: 2017-09-26 09:37 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Cardarella 2017-09-26 03:45:35 PDT
Our site: https://hightide.earth fails to load on initial load. If you refresh it will load as expected. If you close Safari 11 and hit the URL again it will crash again.

The LOC that appears to be affected relates to Google Analytics. The app initializer is attempting to instantiate the GA library with our user key. The code is minified and using AMDs from an Ember.js application.

Because Safari does not allow me to open the JS console prior to visiting any site I cannot debug this. If I visit another site, open JS console, then visit https://hightide.earth the app works as expected. So this is only happening when Hightide is the first app visited in a fresh instance of Safari.

The console error in question: `(0,a.default) is not a function. (In '(0,a.default)("create","UA-24185112-11","auto")', '(0,a.default)' is an instance of Object)`

Again, this is only a problem in a fresh instance of Safari. If I reload the app works as expected. If I visit from another URL the app works as expected. And I have no observed this error in any other browser.
Comment 1 Alexey Proskuryakov 2017-09-26 09:00:08 PDT
One common cause for such symptom is differences in subresource load order when some resources are cached. The webpage may be depending on unspecified implementation details, or WebKit may be loading certain resources in the wrong order. Either way, a reduced test case is needed to investigate.

Is this issue new in Safari 11, or does it reproduce in Safari 10 too?

> Because Safari does not allow me to open the JS console prior to visiting any site I cannot debug this.

I just double-checked that console can be opened in a new blank tab, but the problem doesn't reproduce with the console open.
Comment 2 Brian Cardarella 2017-09-26 09:37:35 PDT
@alex thank you for the quick feedback. This does seem to be the case. I cannot determine if it is < Safari 11 as I cannot find how to install older versions of Safari. I have noticed it since Safari 11 however, but did not specifically try to surface this issue prior to that.

FWIW, I have changed over to the newer "gtag" Google Analytics and everything seems to be working OK. I'll close this out.