Page MenuHomePhabricator

Cannot read property 'length' of null
Closed, ResolvedPublic

Description

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2018.02.06/parsoid?id=AWFsXjkMqJPajYV17K8n&_g=()

TypeError: Cannot read property 'length' of null
    at /srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/src/lib/parse.js:183:60
    at throw (native)
    at tryCatchThrow (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/prfun/lib/index.js:791:36)
    at continuer (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/prfun/lib/index.js:800:24)
    at errback (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/prfun/lib/index.js:813:40)
    at tryCatch1 (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/babybird/lib/promise.js:40:12)
    at promiseReactionJob (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/babybird/lib/promise.js:269:19)
    at PromiseReactionJobTask.call (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/babybird/lib/promise.js:284:3)
    at flush (/srv/deployment/parsoid/deploy-cache/revs/211ea5db92dd320e99361c697f9153ea8fdaa520/node_modules/asap/raw.js:50:29)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

from ptwiki/La_Chapelle-Saint-Sulpice

Event Timeline

Arlolra triaged this task as High priority.Feb 6 2018, 6:50 PM

Yeah, probably -- the code used to be Promise#tap, so it would still have thrown an exception, but that exception would have been ignored.

Now it's try { } finally { ...stuff... } so the exception in the finally cause propagates out. (Sigh.)

Patch at https://gerrit.wikimedia.org/r/408593 -- assuming that the underlying failure in setPageSrc would be properly handled by the caller.

Change 408593 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Don't try to bump parser resource use if setPageSrcInfo is throwing exceptions

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

Change 408593 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Don't try to bump parser resource use if setPageSrcInfo is throwing exceptions

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