Page MenuHomePhabricator

JavaScript crashes frequently due to stashEdit calls
Closed, ResolvedPublic

Description

Users report today that on page source editing JavaScript crashes frequently but unpredictable and not reproducable.

1.28.0-wmf.7 deployed yesterday on German Wikipedia.

No toolbar available, no gadgets any more.

Report caught as follows.

TypeError: $form.serializeObject is not a function
stashEdit/<()
 load.php:162
.Deferred/promise.then/</</<()
 load.php:47
jQuery.Callbacks/fire()
 load.php:45
jQuery.Callbacks/self.add()
 load.php:45
.Deferred/promise.then/</<()
 load.php:47
.each()
 load.php:5
.Deferred/promise.then/<()
 load.php:47
.Deferred()
 load.php:47
.Deferred/promise.then()
 load.php:46
stashEdit()
 load.php:162
onFormLoaded()
 load.php:163
<anonym>
 load.php:163
jQuery.Callbacks/fire()
 load.php:45
jQuery.Callbacks/self.fireWith()
 load.php:46
.ready()
 load.php:49
completed()
 load.php:49
 load.php:162:1334

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 29 2016, 11:20 AM
PerfektesChaos triaged this task as Unbreak Now! priority.Jun 29 2016, 11:21 AM
Restricted Application added subscribers: Luke081515, TerraCodes, Urbanecm. · View Herald TranscriptJun 29 2016, 11:21 AM

This was caused by 9bec479fb4747fee3c7d25d7025e8be01c1e6be3 and should be fixed with 0805859cde89195fd0b7800b0555f6f877ff9731. That patch is only in 1.28.0-wmf.8 (not wmf.7). I thought it is not an issue in practice, so I didn't backport it – I guess it should be, after all. There's a SWAT deployment window in a few minutes, someone should probably do that (I can't at the moment).

Change 296593 had a related patch set uploaded (by Greg Grossmeier):
mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs'

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

hashar added a subscriber: hashar.Jun 29 2016, 3:14 PM

Has been scheduled for SWAT deployment.

Change 296593 merged by jenkins-bot:
mediawiki.action.edit.stash: Restore dependency to 'jquery.getAttrs'

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

Mentioned in SAL [2016-06-29T15:38:22Z] <thcipriani@tin> Synchronized php-1.28.0-wmf.7/resources/Resources.php: SWAT: [[gerrit:296593|mediawiki.action.edit.stash: Restore dependency to "jquery.getAttrs" (T138931)]] (duration: 00m 26s)

Jdforrester-WMF closed this task as Resolved.Jun 29 2016, 4:00 PM
Jdforrester-WMF assigned this task to matmarex.
PerfektesChaos reopened this task as Open.Jun 30 2016, 7:30 AM

REOPENED

I understand that the patch has been backported to wmf-7. Obviously that worked since we get fresh line numbers.

Anotzher patch will be required in wmf-8, too.

Report from Thu morning (2016-06-30):

Exception in module-execute in module mediawiki.action.edit: load.php:178:464
TypeError: $form.serializeObject is not a function TypeError: $form.serializeObject is not a function
Stack-Trace:
[object Object] load.php:178:502
log() load.php:178
handler() load.php:155
jQuery.Callbacks/fire() load.php:45
jQuery.Callbacks/self.fireWith() load.php:46
jQuery.Callbacks/self.fire() load.php:46
mw.track() load.php:155
execute/runScript() load.php:163
execute/</checkCssHandles() load.php:163
execute/</cssHandle/<() load.php:163
jQuery.Callbacks/fire() load.php:45
jQuery.Callbacks/self.fireWith() load.php:46
jQuery.Callbacks/self.fire() load.php:46
fireCallbacks() load.php:157
addEmbeddedCSS() load.php:158
addEmbeddedCSS/cssBufferTimer<() load.php:157

Something might have happened on Thu 08:00, previous report as of 07:30 local time.

0805859cde89195fd0b7800b0555f6f877ff9731 (https://gerrit.wikimedia.org/r/295330) is already included in wmf/1.28.0-wmf.8

According to https://wikitech.wikimedia.org/wiki/Server_Admin_Log the deployment was on 2016-06-29

15:38 logmsgbot: thcipriani@tin Synchronized php-1.28.0-wmf.7/resources/Resources.php: SWAT: mediawiki.action.edit.stash: Restore dependency to "jquery.getAttrs" (T138931) (duration: 00m 26s)

Ineuw added a comment.Jun 30 2016, 4:52 PM

Nothing changed on english Wikisource, the same problems existed as of 2016-06-30 6:00 UTC.

matmarex removed matmarex as the assignee of this task.Jun 30 2016, 10:09 PM
Krinkle added a comment.EditedJul 1 2016, 6:49 PM

@Ineuw I can't reproduce the error on en.wikisource.org.

What browser/OS version are you using?

What do the following commands evaluate to when you're on the edit page?

  • mw.loader.getVersion('mediawiki.action.edit');
  • mw.loader.store.getVary();
  • navigator.userAgent;
  • var state = mw.loader.getModuleNames().sort().reduce(function(obj, m){ var s = mw.loader.getState(m); if(s != 'registered')obj[m] = s; return obj; },{}); JSON.stringify(state,0,2);
Ineuw added a comment.Jul 1 2016, 9:05 PM

@Krinkle Here is the requested info, in the order you asked

Mozilla Firefox 48.0b5, Windows 7 Pro 32 bit

"D6Q1Rca0"

"vector:1-2:en"

"Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0"

mw.loader.getVersion('mediawiki.action.edit')
"D6Q1Rca0"
mw.loader.store.getVary();
"vector:1-2:en"
navigator.userAgent;
"Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0"
var state = mw.loader.getModuleNames().sort().reduce(function(obj, m){ var s = mw.loader.getState(m); if(s != 'registered')obj[m] = s; return obj; },{}); JSON.stringify(state,0,2);

"{

"Spinner": "ready",
"dom-level2-shim": "ready",
"es5-shim": "ready",
"ext.centralNotice.bannerController": "ready",
"ext.centralNotice.choiceData": "ready",
"ext.centralNotice.geoIP": "ready",
"ext.centralNotice.kvStoreMaintenance": "ready",
"ext.centralNotice.startUp": "ready",
"ext.centralauth.ForeignApi": "ready",
"ext.centralauth.centralautologin.clearcookie": "ready",
"ext.charinsert": "ready",
"ext.echo.api": "ready",
"ext.echo.init": "ready",
"ext.eventLogging": "ready",
"ext.eventLogging.subscriber": "ready",
"ext.gadget.CleanDeleteReasons": "ready",
"ext.gadget.CollapsibleNav": "ready",
"ext.gadget.HotCat": "ready",
"ext.gadget.RegexMenuFramework": "ready",
"ext.gadget.UTCLiveClock": "ready",
"ext.gadget.charinsert": "ready",
"ext.gadget.charinsert-core": "ready",
"ext.globalCssJs.site": "ready",
"ext.globalCssJs.user": "ready",
"ext.navigationTiming": "ready",
"ext.proofreadpage.base": "ready",
"ext.proofreadpage.page": "ready",
"ext.proofreadpage.page.edit": "ready",
"ext.proofreadpage.page.navigation": "ready",
"ext.proofreadpage.ve.pageTarget.init": "ready",
"ext.uls.eventlogger": "ready",
"ext.uls.i18n": "ready",
"ext.uls.ime": "ready",
"ext.uls.init": "ready",
"ext.uls.interface": "ready",
"ext.uls.interlanguage": "ready",
"ext.uls.languagenames": "ready",
"ext.uls.mediawiki": "ready",
"ext.uls.messages": "ready",
"ext.uls.preferences": "ready",
"ext.uls.webfonts": "ready",
"ext.uls.webfonts.fonts": "ready",
"ext.uls.webfonts.repository": "ready",
"ext.visualEditor.desktopArticleTarget.init": "ready",
"ext.visualEditor.supportCheck": "ready",
"ext.visualEditor.switching": "ready",
"ext.visualEditor.targetLoader": "ready",
"ext.visualEditor.track": "ready",
"ext.visualEditor.ve": "ready",
"ext.wikiEditor": "ready",
"ext.wikiEditor.toolbar": "ready",
"ext.wikimediaEvents": "ready",
"ext.wikimediaEvents.loggedin": "ready",
"jquery.accessKeyLabel": "ready",
"jquery.async": "ready",
"jquery.byteLength": "ready",
"jquery.byteLimit": "ready",
"jquery.checkboxShiftClick": "ready",
"jquery.client": "ready",
"jquery.cookie": "ready",
"jquery.embedPlayer": "ready",
"jquery.getAttrs": "ready",
"jquery.highlightText": "ready",
"jquery.i18n": "ready",
"jquery.ime": "ready",
"jquery.loadingSpinner": "ready",
"jquery.makeCollapsible": "ready",
"jquery.mousewheel": "ready",
"jquery.mw-jump": "ready",
"jquery.mwEmbedUtil": "ready",
"jquery.placeholder": "ready",
"jquery.prpZoom": "ready",
"jquery.suggestions": "ready",
"jquery.tabIndex": "ready",
"jquery.textSelection": "ready",
"jquery.throttle-debounce": "ready",
"jquery.triggerQueueCallback": "ready",
"jquery.ui.core": "ready",
"jquery.ui.core.styles": "ready",
"jquery.ui.draggable": "ready",
"jquery.ui.mouse": "ready",
"jquery.ui.widget": "ready",
"jquery.uls": "ready",
"jquery.uls.data": "ready",
"jquery.uls.grid": "ready",
"jquery.webfonts": "ready",
"jquery.wikiEditor": "ready",
"jquery.wikiEditor.toolbar": "ready",
"jquery.wikiEditor.toolbar.config": "ready",
"jquery.wikiEditor.toolbar.i18n": "ready",
"json": "ready",
"mediawiki.ForeignApi": "ready",
"mediawiki.ForeignApi.core": "ready",
"mediawiki.RegExp": "ready",
"mediawiki.Title": "ready",
"mediawiki.Uri": "ready",
"mediawiki.action.edit": "ready",
"mediawiki.action.edit.collapsibleFooter": "ready",
"mediawiki.action.edit.styles": "ready",
"mediawiki.action.view.postEdit": "ready",
"mediawiki.api": "ready",
"mediawiki.api.options": "ready",
"mediawiki.api.user": "ready",
"mediawiki.api.watch": "ready",
"mediawiki.cldr": "ready",
"mediawiki.cookie": "ready",
"mediawiki.hidpi": "ready",
"mediawiki.icon": "ready",
"mediawiki.jqueryMsg": "ready",
"mediawiki.language": "ready",
"mediawiki.language.data": "ready",
"mediawiki.language.init": "ready",
"mediawiki.language.specialCharacters": "ready",
"mediawiki.legacy.wikibits": "ready",
"mediawiki.libs.pluralruleparser": "ready",
"mediawiki.notify": "ready",
"mediawiki.page.ready": "ready",
"mediawiki.page.startup": "ready",
"mediawiki.page.watch.ajax": "ready",
"mediawiki.searchSuggest": "ready",
"mediawiki.storage": "ready",
"mediawiki.template": "ready",
"mediawiki.template.regexp": "ready",
"mediawiki.toolbar": "ready",
"mediawiki.user": "ready",
"mediawiki.util": "ready",
"mw.EmbedPlayer.loader": "ready",
"mw.MediaWikiPlayer.loader": "ready",
"mw.MwEmbedSupport": "ready",
"mw.MwEmbedSupport.style": "ready",
"mw.PopUpMediaTransform": "ready",
"mw.PopUpMediaTransform.styles": "ready",
"mw.TimedText.loader": "ready",
"oojs": "ready",
"oojs-ui": "ready",
"oojs-ui-core": "ready",
"oojs-ui-core.styles": "ready",
"oojs-ui-toolbars": "ready",
"oojs-ui-widgets": "ready",
"oojs-ui-windows": "ready",
"oojs-ui.styles.icons": "ready",
"oojs-ui.styles.icons-editing-core": "ready",
"oojs-ui.styles.indicators": "ready",
"oojs-ui.styles.textures": "ready",
"schema.NavigationTiming": "ready",
"schema.SaveTiming": "ready",
"schema.UniversalLanguageSelector": "ready",
"site": "ready",
"skins.vector.js": "ready",
"user": "ready",
"user.defaults": "ready",
"user.options": "ready",
"user.tokens": "ready"

}"

Ineuw added a comment.Jul 1 2016, 9:10 PM

Let's be clear. My yesterday's comment, reflected the state of the editor then. Now, it seems OK. It must have been patched between now @ 21:10 UTC and 2016-06-30 6:00 UTC.

Krinkle closed this task as Resolved.Jul 1 2016, 9:16 PM
Krinkle claimed this task.

@Ineuw Thanks for the info. I'll go ahead and close this task then :)

Ineuw added a comment.Jul 1 2016, 9:21 PM

Thanks for forcing me to learn/use the developer's tools. I hope the info was helpful. For me it's a 1000% improvement over my ignorance from when I posted the first bug report. The question is, were the identical issues at the German Wikisource, which resolved their issues?

Thanks for forcing me to learn/use the developer's tools. I hope the info was helpful. For me it's a 1000% improvement over my ignorance from when I posted the first bug report. The question is, were the identical issues at the German Wikisource, which resolved their issues?

I'm not familiar with the issues German Wikisource had, but the issue reported in this task (Exception "$form.serializeObject is undefined" when editing a page) was caused by a general bug in the MediaWiki software, it affected all Wikimedia wikis. It was not specific to Wikisource or a specific language.

The exception caused "Edit Stash" to fail (EditStash a feature to reduce the time it takes to save a page). The actual saving of edits worked fine. Although in some circumstances the error caused some custom toolbar buttons to be missing for some users.