Page MenuHomePhabricator

Parsoid Normalizer error: Cannot read property 'nodeValue' of null
Closed, ResolvedPublic

Description

While debugging a publishing error in CX, I came across this error in parsoid

[fatal][enwiki/Miguel_Ángel_Menéndez] Cannot read property 'nodeValue' of null
TypeError: Cannot read property 'nodeValue' of null
    at Normalizer.moveTrailingSpacesOut (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:218:24)
    at Normalizer.normalizeNode (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:278:8)
    at Normalizer.processNode (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:445:15)
    at Normalizer.processSubtree (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:393:11)
    at Normalizer.processNode (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:442:9)
    at Normalizer.normalizeDOM (/home/santhosh/dev/wiki/parsoid/lib/wts.normalizeDOM.js:463:14)
    at WikitextSerializer.WSP.serializeDOMSync (/home/santhosh/dev/wiki/parsoid/lib/mediawiki.WikitextSerializer.js:1357:26)
    at WikitextSerializer.WSP.serializeHTML (/home/santhosh/dev/wiki/parsoid/lib/mediawiki.WikitextSerializer.js:92:40)
    at WikitextSerializer.WSP._buildExtensionWT (/home/santhosh/dev/wiki/parsoid/lib/mediawiki.WikitextSerializer.js:634:24)
    at Object.handle (/home/santhosh/dev/wiki/parsoid/lib/mediawiki.WikitextSerializer.js:701:30)

To reproduce, try the HTML in P1905
The HTML to wikitext conversion works fine. If the conversion done with 'scrubWikitext' => 1, the above failure happens. CX uses 'scrubWikitext' => 1, setting.

The above error is from my local parsoid running master code(5fa1a9d8f8941d31502019baf950e608237efed1)

Event Timeline

santhosh raised the priority of this task from to Needs Triage.
santhosh updated the task description. (Show Details)
santhosh added subscribers: santhosh, ssastry, cscott.
santhosh set Security to None.
Amire80 triaged this task as High priority.Aug 20 2015, 8:18 AM

Change 232732 had a related patch set uploaded (by Subramanya Sastry):
T109686: Fix crasher in the normalizer

https://gerrit.wikimedia.org/r/232732

Change 232733 had a related patch set uploaded (by Arlolra):
T109686: Fix crasher in normalizer

https://gerrit.wikimedia.org/r/232733

Change 232733 abandoned by Subramanya Sastry:
T109686: Fix crasher in normalizer

https://gerrit.wikimedia.org/r/232733

Change 232733 restored by Subramanya Sastry:
T109686: Fix crasher in normalizer

Reason:
i have itchy fingers this morning.

https://gerrit.wikimedia.org/r/232733

Change 232732 abandoned by Subramanya Sastry:
T109686: Fix crasher in the normalizer

https://gerrit.wikimedia.org/r/232732

Change 232733 merged by jenkins-bot:
T109686: Fix crasher in normalizer

https://gerrit.wikimedia.org/r/232733

Arlolra claimed this task.
Arlolra subscribed.

Should be deployed on Monday ... or does it need to go out sooner?

Should be deployed on Monday ... or does it need to go out sooner?

Actually, went out today. Enjoy!