Page MenuHomePhabricator

Cannot read property 'substring' of null
Closed, ResolvedPublic


The following error started appearing in RESTBase logs:

Cannot read property 'substring' of null
TypeError: Cannot read property 'substring' of null
    at Object.extractExtBody (/srv/deployment/parsoid/deploy-cache/revs/8a2c0ce70f3b548b806556247962077b9d951791/src/lib/utils/Util.js:1277:13)
    at Object.Util.getArgInfo (/srv/deployment/parsoid/deploy-cache/revs/8a2c0ce70f3b548b806556247962077b9d951791/src/lib/utils/Util.js:1554:25)

Its happening on requests to transform some content. Which exact content is being transformed is unknown.

Event Timeline

Pchelolo created this task.Nov 2 2017, 1:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 2 2017, 1:22 PM
Arlolra claimed this task.Nov 2 2017, 3:46 PM
Arlolra triaged this task as Medium priority.Nov 2 2017, 5:31 PM

One way to reproduce this is echo "-{</nowiki>bo:g;us:xyz;zh-cn:abc}-" | node bin/parse --domain

But I'm wondering why this is only showing up lately. Was VE recently enable on a wiki supporting LC?

I should look at the RESTBase logs to see where this is showing up, even if we don't know the content.

cscott added a subscriber: cscott.Nov 2 2017, 5:33 PM

AFAIK, VE has always been enabled, just not used by default. And I think we're still pulling all the LC wiki content into restbase via changeprop. So it's possible we've got a particular user using VE heavily or particular set of pages which just got created.

According to Logstash it appeared at the beginning of October, and then sporadically appearing towards the middle of the month, only to disappear and reappear in higher volume at the end of the month.

Ok, all those logs are from zh or sr which have LC enabled.

A specific example is http://localhost:8000/ which points to the same place in the tokenizer as the above snipit.

Pushing my fix.

Change 388157 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] [WIP] T179579: Fix nowiki in LC markup tokenizing

Change 388157 merged by jenkins-bot:
[mediawiki/services/parsoid@master] T179579: Fix nowiki in LC markup tokenizing

Arlolra closed this task as Resolved.Nov 3 2017, 4:28 PM

Mentioned in SAL (#wikimedia-operations) [2017-11-06T21:48:47Z] <arlolra> Updated Parsoid to 6cb77104 (T179579, T175792)