Page MenuHomePhabricator

TypeError: this.selection.isNull is not a function
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.09.01/clienterror/?id=AXRKqCB3MQ_08tQaVMju

message
TypeError: this.selection.isNull is not a function

Impact

This error seems to be showing up in the execution fo a user script. However, the error itself is occurring inside ve.dm.SurfaceFragment in the call to model.getFragment( nodeRange ).getData();

Notes

Details

Request ID
undefined
Request URL
n/a
Stack Trace
exception.trace
at ve.dm.SurfaceFragment.prototype.isNull <url2>:250:576
at ve.dm.SurfaceFragment.prototype.update <url2>:249:400
at ve.dm.SurfaceFragment.prototype.getSelection <url2>:250:471
at ve.dm.SurfaceFragment.prototype.getData <url2>:254:365
at getText https://en.wikipedia.org/w/index.php?title=User:%D7%A2%D7%A8%D7%9F/WeaselWords.js&action=raw&ctype=text/javascript&_=1598980289638:109:51
at loadWeaselWords/< https://en.wikipedia.org/w/index.php?title=User:%D7%A2%D7%A8%D7%9F/WeaselWords.js&action=raw&ctype=text/javascript&_=1598980289638:60:28
at fire <url1>:213:209
at fireWith <url1>:214:402
at Deferred/</deferred[tuple[0]] <url1>:217:900
at ajax/xhr< <url1>:977:391
at fire <url1>:213:209
at fireWith <url1>:214:402
at done <url1>:296:95
at callback/< <url1>:299:601

Event Timeline

The gadget must be creating a SurfaceFragment without a selection. The best we could do in the code is throw an exception sooner, which wouldn't be that helpful, so we should just inform the gadget author and close.

https://en.wikipedia.org/w/index.php?title=User:%D7%A2%D7%A8%D7%9F/WeaselWords.js

Is there some guidance we can give the gadget developers? I hadn't noticed the WeaselWords script being involved here. I'm also happy to push a fix to the wiki page if it's a relatively easy one.