console.bloomberg.com - Site doesn't load
Categories
(Web Compatibility :: Site Reports, defect, P1)
Tracking
(Not tracked)
People
(Reporter: ksenia, Unassigned)
References
()
Details
(Keywords: webcompat:contact-in-progress, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs])
User Story
platform:windows,mac,linux impact:site-broken configuration:general affects:all branch:release diagnosis-team:javascript outreach-assignee:emilio outreach-contact-date:2024-09-04
Environment:
Operating system: Linux
Originally reported Firefox version: Firefox 122.0
Last reproduced with the following UA: Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0
Platforms reproduced on: linux
Steps to reproduce:
I tested in Chrome and it was loaded correctly
Actual Behavior:
Page not loading correctly
Created from https://github.com/webcompat/web-bugs/issues/130817
Reporter | ||
Updated•5 months ago
|
Reporter | ||
Comment 1•5 months ago
|
||
The site doesn't load most of the time, so setting impact:site-broken
Comment 2•2 months ago
|
||
I get
Uncaught Error: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
assertZonePatched https://console.bloomberg.com/polyfills.1791f3281314e316a65c.js:1
e https://console.bloomberg.com/main.dd3cf4cf6239df71288c.js:1
bootstrapModuleFactory https://console.bloomberg.com/main.dd3cf4cf6239df71288c.js:1
3fqI https://console.bloomberg.com/main.dd3cf4cf6239df71288c.js:1
n https://console.bloomberg.com/runtime.c2cb1ae11831315a0a4a.js:1
0 https://console.bloomberg.com/main.dd3cf4cf6239df71288c.js:1
n https://console.bloomberg.com/runtime.c2cb1ae11831315a0a4a.js:1
t https://console.bloomberg.com/runtime.c2cb1ae11831315a0a4a.js:1
a https://console.bloomberg.com/runtime.c2cb1ae11831315a0a4a.js:1
<anonymous> https://console.bloomberg.com/main.dd3cf4cf6239df71288c.js:1
on the broken loads.
Comment 3•2 months ago
|
||
I think this is caused by https://console.bloomberg.com/ec-shell/index.js?build=sprint143-8b2bff881da73dc51053becc8a7c0ff2e3bb02a0-2d9fa30299638561dcfed89a85a9a74318394c21-058509a21f6210588094722079c7cedf0cf99b2f overwriting window.Promise
with a call like:
c({
global: !0,
wrap: !0,
forced: J
}, {
Promise: X
})
Comment 4•2 months ago
|
||
forced
is true in Firefox and false in Chrome
Comment 5•2 months ago
|
||
There's UA sniffing happening that looks like:
function (e, t, n) {
var r,
a,
i = n(4),
o = n(71),
c = i.process,
s = c &&
c.versions,
u = s &&
s.v8;
u ? a = (r = u.split('.')) [0] + r[1] : o &&
(!(r = o.match(/Edge\/(\d+)/)) || r[1] >= 74) &&
(r = o.match(/Chrome\/(\d+)/)) &&
(a = r[1]),
e.exports = a &&
+ a
}
Spoofing the Chrome UA causes the site to load properly
Comment 6•2 months ago
|
||
Comment 7•2 months ago
•
|
||
Comment 8•2 months ago
|
||
It looks like core-js is detecting broken subclassing in Zone.js's Promise polyfill. With Chrome versions newer than 51 it skips that detection.
Comment 9•2 months ago
|
||
console.bloomberg.com doesn't seem to have loading problems in Safari which is not what I'd expect given the above
Comment 10•2 months ago
|
||
It seems like Safari doesn't trigger this because it runs main.dd3cf4cf6239df71288c.js/bootstrapModuleFactory before index.js.
Comment 11•2 months ago
|
||
Here's a profile that shows us running the async main.js script before the sync index.js https://share.firefox.dev/4g1LnaI
Smaug, do you know why we run the async script first?
Updated•2 months ago
|
Comment 12•2 months ago
|
||
Another thing of note is that Zone.js Promise polyfill purposely pretends to be native: https://github.com/angular/zone.js/pull/564/commits/a556add49357d749eecf23220addda748dfb68ca
This causes core-js to skip over the subclassing test.
Comment 13•2 months ago
|
||
async scripts run whenever they get chance to run.
HTML spec
"For classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available (potentially before parsing completes)."
So nothing defines if an async script before a sync script runs before or after it.
jrmuizel, did you mean sync main.js, and async index.js, since that is what I see in the source code. URLs are stripped from the profile.
Comment 14•2 months ago
|
||
Yes, sorry I did mean sync main.js and async index.js.
Comment 15•2 months ago
|
||
Have we contacted Bloomberg that their use of <script async> seems to be racy?
Comment 16•2 months ago
|
||
Also, it seems like current versions of zone.js have working subclassing working and thus won't be overwritten by core-js
Updated•2 months ago
|
Updated•2 months ago
|
Description
•