Closed Bug 615659 Opened 14 years ago Closed 11 years ago

htc sense fails to load in Firefox 4/Fennec

Categories

(Tech Evangelism Graveyard :: German, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cbook, Unassigned)

References

()

Details

While testing out my new htc desire hd i found a bug - reproducible in Firefox 4 Beta8pre and Fennec. Steps to reproduce: -> load htcsense like as example http://htcsense.com/de -> black page should load content like on safari etc.
Worksforme on Mac. Is this mobile-specific? Is the site sniffing?
(In reply to comment #1) > Worksforme on Mac. Is this mobile-specific? Is the site sniffing? hm boris, did you selected a locale/country (that might be the point of failure - after that it should fail/show black page)
Ah, no. I'd just loaded the url in comment 0; I missed it redirecting. I can confirm that if I then select "Deutschland" I get the issue. It looks like their JS errors out due to this line: doc.head = doc.getElementsByTagName('head')[0]; which is setting a readonly property on the HTMLDocument (see bug 548828). Unfortunately, we throw on attempts to set readonly DOM properties. Perhaps we should change that for 2.0?
Blocks: 548828
requesting blocking 2.0 since this website is a major feature in some new upcoming and well used htc phones
blocking2.0: --- → ?
Does webkit support the new document.head property, and if so, is it settable there?
Webkit does, and it's readonly. But it's the ECMAScript meaning of readonly, which means sets are just silently ignored (whereas we do it by having a throwing setter). Testcase: javascript:document.head = 1; alert(document.head) In this site's case, it's setting document.head to the value it "should" have anyway, so ignoring the set doesn't cause problems.
bz, I could have sworn you were right in that javascript: URI throwing, but I get an alert here, both on trunk and in beta7. I don't understand why though.
Hrm. That's really odd... I see that too, though. It certainly throws on the site!
Nevermind, coment 3 is halfway on crack. We report an error (using JS_ReportErrorFlagsAndNumber) but do NOT normally throw when writing to a readonly DOM property, as far as I can tell. So there's an error in the error console, but no exception thrown to the script, usually. The real issue is that this code: doc.head = doc.getElementsByTagName('head')[0]; occurs in https://www.htcsense.com/$WT$/de/services/boot-js.js on line 342. And line 1 of that script is: "use strict"; And in ES5 strict mode, trying to write to a readonly property is _supposed_ to throw. So this is just a site bug, I think. ccing some JS folks to confirm, but also moving to evangelism. This would break in any browser implementing strict mode correctly.
Assignee: nobody → german
blocking2.0: ? → ---
Component: General → German
Product: Core → Tech Evangelism
QA Contact: general → german
Version: Trunk → unspecified
Brendan, see comment 9.
I _think_ I managed to mail their customer service; their site is really broken (e.g. 404 "Contact" links!). If someone else has contacts there, please try them too?
Works for me running firefox 4 on a desktop running windows 7 32bit. I selected a country; the link shows https://www.htcsense.com/us/# brings me to a login page.
It certainly doesn't work for me on Mac. Maybe they're sniffing, in addition to everything else?
adding kev and christian, maybe they have a contact at htc
Works fine here.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.