Page MenuHomePhabricator

history replaceState crashes when first argument is a JSON object on Nokia S60
Closed, ResolvedPublic


Author: lostrego242

Subsection expand buttons of mobile version stopped working on nokia S60 browser, and is a major issue as the browser just exits/disappears once clicked.

Happens on any article viewed on mobile version with the mini map browser included on this devices, currently a Nokia E52 (S60 3rd ed. FP2).

It worked fine until few days ago (maybe 2 or 3 days, since then I'm stuck on an unusable mobile version as the link for desktop version is also on an expand button, sadly i don't know if there is any emulator to reproduce the bug on a desktop PC.

Maybe this browser is not supported by wikipedia and the mobile is quite old now, but that's a pity as it worked flawlessly until some days ago.

Thanks in advance.

Version: unspecified
Severity: major
OS: other
Platform: Other



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:45 AM
bzimport set Reference to bz41407.

lostrego242 wrote:


I've got an error log of the javascript interpreter:

26/10/2012 02:33:07
URL: Line: 23
Log: {"event_id":"mobile","delta":54277,"data":"SectionToggled","beta":null,"session":1351215133172,"page":"Commodore Amiga","info":"section_1"}

Hi lostrego
This is most strange.... as I'm unable to replicate on a similar phone. The thing that is confusing me is that if you are able to see the buttons and click on them (making them disappear) it suggests the code is working as expected but the styling is not being applied.

Can I answer several questions for us:

  1. Did you check into the beta of the site (the beta will not work on your phone)
  2. Can you clear your cache and tell me if that improves the situation?
  3. If you click the heading title rather than the button does this expand the sections?
  4. Is that log from your phone or from another browser?

Note to avoid confusion the 'error log' posted n #c1 is actually not related and shouldn't prevent toggling from working.

lostrego242 wrote:

Maybe I've explained it a bit wrong, is the browser itself what disappears, it crashes once the expand section tab is pressed.

And for the questions :

  1. Nope, I assume it's the main mobile front end as fas as I know (, I'm not aware of that beta.
  1. All cache cleared, and all other data, including cookies etc... and the behavior is the same.
  1. Nope, it does the same behavior, the browser crash.
  1. Log is from phone's browser, using an option in the browser settings/general menu for logging errors on Java/ECMA scripts.

Log itself is what's shown once pressed the section expand tab just after crashing.

Note: Tested also with opera mobile for symbian and the error is not present, work as expected.

Hope it helps.

The good news is I can now replicate this meaning hopefully we can get this fixed asap. Sorry for the delay so far.

The offending line of code is:
window.history.replaceState( { title: currentTitle, hash: true }, currentTitle, newHash );

It seems that replaceState cannot handle a first argument which is a JSON.
The situation in the beta is even worse (browser crashes on a page load)

Thus this requires some thought - we can either disable enhanced functionality for this phone or try to work around these bugs by passing strings and using JSON.stringify

I will push a temporary fix soon.

lostrego242 wrote:

Thanks for reply, I've tested it on the affected nokia now and It wont crash the browser anymore thus now the expand tab doesn't do anything once clicked (tested at this moment)

Hope it helps somehow.

Hi Lostrego - bit confused by your reply.

Are you saying you checked the patch and that it fixes the problem for you?

When the arrows are clicked to expand a section you should see the text of the section. Is this not the case?

lostrego242 wrote:

Hi Jon

I've tested navigation on some entries at itself, don't know if bug was fixed already but now it has that behavior, just the title of each section is shown with their respective horizontal separator lines, but not the arrow that used to be at the right.

I remember that before by either clicking on the arrow or over the section tittle it expanded, but now no arrow is present and clicking over section title does nothing, the text of the section is not shown.

lostrego - the new issue your talking about seems to have been a regression and is explained in another bug (bug 42749)