Page MenuHomePhabricator

VisualEditor does not load on Opera when debugging with Dragonfly
Closed, ResolvedPublic

Description

Would you believe that.

[6/29/2013 1:44:17 PM] JavaScript - https://pl.wikipedia.org/wiki/Gródek_(obwód_lwowski)?veaction=edit
Event thread: readystatechange
Uncaught exception: Error: WRONG_ARGUMENTS_ERRError thrown at line 39, column 4 in <anonymous function: ve.copyDomElements>(domElement) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.base%2Cmediawiki%2CviewPageTarget%7Cjquery.visibleText%7Coojs%7Cunicodejs.wordbreak&skin=vector&version=20130629T021004Z&*:

return doc ? doc.importNode(domElement, true) : domElement.cloneNode(true);

called from line 38, column 3 in <anonymous function: ve.copyDomElements>(domElements, doc) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.base%2Cmediawiki%2CviewPageTarget%7Cjquery.visibleText%7Coojs%7Cunicodejs.wordbreak&skin=vector&version=20130629T021004Z&*:

return domElements.map(function(domElement) {

called from line 9721, column 3 in <anonymous function: ve.ce.GeneratedContentNode.prototype.onUpdate>() in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

this.$.empty().append(ve.copyDomElements(store.value(index), doc));

called from line 9711, column 2 in VeCeGeneratedContentNode() in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

this.onUpdate();

called via Function.prototype.call() from line 10325, column 2 in VeCeMWTransclusionNode(model, config) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

ve.ce.GeneratedContentNode.call(this);

called via Function.prototype.call() from line 10366, column 2 in VeCeMWTransclusionBlockNode(model) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

ve.ce.MWTransclusionNode.call(this, model);

called via Function.prototype.apply() from line 50, column 2 in <anonymous function: ve.Factory.prototype.create>(name) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

constructor.apply(obj, args);

called from line 8132, column 4 in <anonymous function: ve.ce.BranchNode.prototype.onSplice>(index) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

args[i] = ve.ce.nodeFactory.create(args[i].getType(), args[i]);

called via Function.prototype.apply() from line 8089, column 2 in VeCeBranchNode(model, config) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

this.onSplice.apply(this, [0, 0].concat(model.getChildren()));

called via Function.prototype.call() from line 9824, column 2 in VeCeDocumentNode(model, surface, config) in https://bits.wikimedia.org/pl.wikipedia.org/load.php?debug=false&lang=pl&modules=ext.visualEditor.core%2Cicons-vector%7Cext.visualEditor.viewPageTarget.icons-vector%7Crangy&skin=vector&version=20130629T021004Z&*:

ve.ce.BranchNode.call(this, model, config);

At this point store.value(index) is [undefined, undefined] on Opera, but [<span...>, <dl...>] on Firefox. Since index is not undefined, this would indicate some sort of an internal inconsistency.


Version: unspecified
Severity: normal

Details

Reference
bz50417

Event Timeline

bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz50417.

Hey, it's even better – all of the arrays in store.valueStore apparently consist only of varying number of undefineds.

And this is because ve.copyArray() is losing data, always returning an array of undefineds there.

And that is because #cloneNode is returning undefined for those elements (probably because they come from some weird dynamically-generated document). Which is clearly an Opera bug, but it'd be nice to work around it somehow.

I know why it only fails when debugging: because the fix in https://gerrit.wikimedia.org/r/#/c/61560/ is only applied when not debugging. Apparently the document there is *still* not a document evenif it appears to be one.

Change 71174 had a related patch set uploaded by Matmarex:
Make loading VE work on Opera again, attempt two

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

Change 71174 merged by jenkins-bot:
Make loading VE work on Opera again, attempt two

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