Page MenuHomePhabricator

Cannot read property 'push' of undefined
Closed, ResolvedPublic

Description

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2018.04.09/parsoid?id=AWKsI_H3hjEUnI8oDCcU&_g=h@44136fa

enwiki/Wikipedia:Redirects_for_discussion/Log/2017_January_19

TypeError: Cannot read property 'push' of undefined
    at NoInclude.TokenCollector._onAnyToken (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/tt/TokenCollector.js:152:27)
    at SyncTokenTransformManager.onChunk (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/TokenTransformManager.js:927:22)
    at emitOne (events.js:96:13)
    at PegTokenizer.emit (events.js:188:7)
    at emitChunk (eval at <anonymous> (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/tokenizer.js:1:0), <anonymous>:20274:25)
    at peg$c0 (eval at <anonymous> (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/tokenizer.js:1:0), <anonymous>:235:13)
    at Object.next (eval at <anonymous> (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/tokenizer.js:1:0), <anonymous>:1956:14)
    at Immediate.tokenizeChunk (/srv/deployment/parsoid/deploy-cache/revs/447fab23b53326a88581219236332de9dbad0119/src/lib/wt2html/tokenizer.js:301:20)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

This may be the result of today's deploy

Event Timeline

Arlolra created this task.Apr 9 2018, 8:46 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 9 2018, 8:46 PM
Arlolra triaged this task as High priority.Apr 9 2018, 8:46 PM

Reduced test case:

[subbu@earth:~/work/wmf/parsoid] echo '{{#ifeq:{{FULLPAGENAME}}|X|{{Rfd top collapse|FOO}}|}}' | parse.js
[fatal][enwiki/Main Page] Cannot read property 'push' of undefined
TypeError: Cannot read property 'push' of undefined
    at NoInclude.TokenCollector._onAnyToken (/home/subbu/work/wmf/parsoid/lib/wt2html/tt/TokenCollector.js:152:27)
    at SyncTokenTransformManager.onChunk (/home/subbu/work/wmf/parsoid/lib/wt2html/TokenTransformManager.js:927:22)
    at emitOne (events.js:96:13)
    at PegTokenizer.emit (events.js:188:7)
    at emitChunk (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:20274:25)
    at peg$c0 (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:235:13)
    at Object.next (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:1956:14)
    at Immediate.tokenizeChunk (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:301:20)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

Even smaller:

[subbu@earth:~/work/wmf/parsoid] echo '{{Rfd top collapse|x}}' | parse.js --dump tplsrc
=================================
Template:Rfd_top_collapse
---------------------------------
<div class="boilerplate rfd vfd xfd-closed" style="background:#FFEEDD; margin-top:0.5em; padding:0 10px 0 10px; border:1px solid #888888;">
<strong class="error"> This template must be [[Wikipedia:Template substitution|substituted]].</strong>
:''The following is an archived discussion concerning one or more redirects. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made on an appropriate discussion page (such as the redirect's [[Help:Using talk pages|talk page]] or in a [[Wikipedia:Deletion review|deletion review]]). No further edits should be made to this section.''

:The result of the discussion was </noinclude>x<includeonly></div></includeonly><noinclude>
---------------------------------
[fatal][enwiki/Main Page] Cannot read property 'push' of undefined
TypeError: Cannot read property 'push' of undefined
    at NoInclude.TokenCollector._onAnyToken (/home/subbu/work/wmf/parsoid/lib/wt2html/tt/TokenCollector.js:152:27)
    at SyncTokenTransformManager.onChunk (/home/subbu/work/wmf/parsoid/lib/wt2html/TokenTransformManager.js:927:22)
    at emitOne (events.js:96:13)
    at PegTokenizer.emit (events.js:188:7)
    at emitChunk (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:20274:25)
    at peg$c0 (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:235:13)
    at Object.next (eval at <anonymous> (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:215:38), <anonymous>:1956:14)
    at Immediate.tokenizeChunk (/home/subbu/work/wmf/parsoid/lib/wt2html/tokenizer.js:301:20)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

Change 425414 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Handle token transformers that modify the parsing pipeline

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

Change 425440 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Revert "Fix inefficiency in SyncTokenTransformManager"

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

Change 425440 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Revert "Fix inefficiency in SyncTokenTransformManager"

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

Change 425414 abandoned by Subramanya Sastry:
Handle token transformers that modify the parsing pipeline

Reason:
In favour of https://gerrit.wikimedia.org/r/#/c/435936/

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

Mentioned in SAL (#wikimedia-operations) [2018-06-11T20:57:57Z] <arlolra> Updated Parsoid to 06b74d2 (T191843)