Closed
Bug 976956
Opened 11 years ago
Closed 10 years ago
m.juegos.com fails to load in Firefox on Android because JavaScript assumes Android version number is in UA string
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: hsteen, Assigned: karlcow)
References
()
Details
(Whiteboard: [clientsniff][androidversion][sitewait][country-ar])
m.juegos.com hangs while loading, saying "cargando...".
The reason is a JavaScript error: "TypeError: k[q].version.exec(...) is null" that happens during the load process. Last part of stack is:
n@http://m.juegos.com/js/core-min.js:1
h@http://m.juegos.com/js/core-min.js:1
FeatureDetection/f.start@http://m.juegos.com/js/core-min.js:1
The version property is defined earlier:
{
os: /(android)/i,
version: /android\s+([0-9]+(\D{1}[0-9]+(\D{1}[0-9])?)?)/i
}
and this code will throw:
return k[q].version.exec(l)[1]
when there is no version number after the string "Android" in the navigator.userAgent string, because exec() returns null and taking the 1st property of null throws.
| Reporter | ||
Comment 1•11 years ago
|
||
| suggestedfix | ||
A suitable fix would be to add a check to make sure that exec() returns something - for example like this:
if(k[q].version.exec(l)){
return k[q].version.exec(l)[1];
}
return '';
There may be other code elsewhere that relies on the return value though, so follow-up fixes may be required.
| Assignee | ||
Comment 2•11 years ago
|
||
This Web site is part of a much bigger company. They own many Web sites across the world.
http://www.spilgames.com/about-us/game-sites/
The funny thing is that the address on their Web site doesn't mention the country.
Arendstraat 23
1223 RE Hilversum
So it's The Netherlands.
Their email address is info@spilgames.com
They are also on twitter. https://twitter.com/spilgames Let's try a human contact on twitter first.
1st attempt
http://twitter.com/MozWebCompat/status/491811482649108482
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
Whiteboard: [clientsniff][androidversion][contactready][country-ar] → [clientsniff][androidversion][sitwait][country-ar]
| Assignee | ||
Updated•11 years ago
|
Whiteboard: [clientsniff][androidversion][sitwait][country-ar] → [clientsniff][androidversion][sitewait][country-ar]
| Assignee | ||
Comment 3•10 years ago
|
||
This is fixed. The site now redirects for *all devices* to www.juegos.com which hosts a responsive Web site.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Tech Evangelism → Web Compatibility
Updated•1 year ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•