Page MenuHomePhabricator

DataCloneError: Failed to execute 'pushState' on 'History': HTMLLIElement object could not be cloned / DataCloneError: The object could not be cloned in changeUrl
Open, LowPublicPRODUCTION ERROR

Description

Traffic is low (6 errors in last 7 days) but raising in case it breaks an important workfloe.

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-2021.05.22?id=ttANlXkBStjVNP_PKf3W

message
DataCloneError: Failed to execute 'pushState' on 'History': HTMLLIElement object could not be cloned.
trace
at Object.changeUrl  URL1:98:850
at Object.changeFilter  URL1:98:423
at HTMLButtonElement.<anonymous>  URL1:83:358
at HTMLButtonElement.dispatch  URL1:176:214
at HTMLButtonElement.elemData.handle  URL1:172:848

URL1: https://meta.wikimedia.org/w/load.php?lang=en&modules=ext.translate.base%2Cdropdownmenu%2Ceditor%2Cgroupselector%2Cloader%2Cmessagetable%2Cparsers%2Crecentgroups%2Cstatsbar%7Cext.translate.special.translate%7Cjquery%7Cjquery.makeCollapsible.styles%7Cjquery.ui&skin=vector&version=1o4qi

Using mediawiki.router might help here.

Details

Request URL
https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Wikivoyage%2FWhy&action=page&filter=%21translated&language=tl

Event Timeline

  • Location: https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Wikivoyage%2FWhy&action=page&filter=%21translated&language=tl.
  • Browser: Chrome 90.
ext.translate.special.translate.js
	changeFilter: function ( filter ) {
		if ( !checkDirty() ) {
			return;
		}
		mw.translate.changeUrl( { filter: filter, showMessage: null } );
		state.messageList.changeSettings( { filter: getActualFilter( filter ) } );
	},

	changeUrl: function ( params, forceChange ) {
		var uri = new mw.Uri( window.location.href );
		uri.extend( params );
		Object.keys( params ).forEach( function ( key ) {
			if ( params[ key ] === null ) {
				delete uri.query[ key ];
			}
		} );

		if ( uri.toString() === window.location.href ) {
			return;
		}

		if ( !forceChange && history.pushState && $( '.tux-messagelist' ).length ) {
			history.pushState( uri, null, uri.toString() );

I don't think using a different way to changing the URL will avoid this error. It seems the problem is that a DOM element is making its way into the serialization here, which is not something browsers generally support. As for how, I don't know. The above code shows null being passed, so I'm not sure what is leading it to serialize a DOM element here.

Krinkle changed the subtype of this task from "Task" to "Production Error".
Krinkle set Request URL to https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Wikivoyage%2FWhy&action=page&filter=%21translated&language=tl.