Page MenuHomePhabricator

TypeError: undefined is not an object (evaluating 'task.token')
Closed, ResolvedPublicPRODUCTION ERROR


TypeError: undefined is not an object (evaluating 'task.token')
at dispatch

Example 1

at NewcomerTaskLogger.log
at SuggestedEditsModule.logCardData

Example 2

at NewcomerTaskLogger.log at SuggestedEditsModule.logCardData at SuggestedEditsModule.logEditTaskClick at SuggestedEditsModule.<anonymous> at HTMLAnchorElement.dispatch at HTMLAnchorElement.elemData.handle

Steps to reproduce:

  1. On Special:Homepage (desktop) or suggested edits overlay (mobile), open suggested edits filter
  2. Make a selection and click done
  3. While the action is in progress (ellipsis shown at the bottom of the filter), close the filter
  4. Click on the task card

Screen recording:

Event Timeline

This seems to be thrown at the beginning of NewcomerTaskLogger.log (although the line number is off by one, but maybe the code in master changed since the branch cut?) when called from SuggestedEditsModule.logCardData.

This might be the same issue as T296043: TypeError: undefined is not an object (evaluating ''), where the edit button widget was disabled, but the event listener was on the button element so the click was logged when it wasn't supposed to. The issue was was fixed in wmf12, which was released on Dec 9, but was rolled back. Looking at the last 30 days, this error was more frequent prior and the latest was from Dec 13 (which was when wmf12 was released again).

Sgs removed Sgs as the assignee of this task.Dec 16 2021, 6:07 PM
mewoph added a subscriber: Etonkovidova.

@Etonkovidova FYI I'm moving this to test in production in case this error comes up even with wmf12.

Etonkovidova claimed this task.

Checked after wmf.13 deployment - no errors. The last timestamp for the error is Dec 13, 2021 @ 12:13:31.691 (

mewoph updated the task description. (Show Details)

Looking at the errors from Dec 17 to today, the majority of the errors are from mobile with more errors coming from logEditTaskClick (which on mobile could be either clicking on the edit button or the task card in the suggested edits module).

Change 753580 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Close the filters dialog after the task feed has been updated

Updated the filters dialog to close after the task feed have been updated — I think this would make the experience less confusing for users since before this change, some users would see the old task feed while the API request is in progress before it got replaced by the new feed)


suggestededitsFilters_loading.gif (1×708 px, 1 MB)


dt.gif (1×2 px, 2 MB)

Change 753580 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Suggested Edits: Close the filters dialog after the task feed has been updated

Etonkovidova closed this task as Resolved.EditedFeb 3 2022, 10:37 PM

Checked on wmf.20 - the last error (and the only one for 30 days) was recorded on Jan 27/2022 before the patch was deployed (

Also checked for

  • triggering for the error
  • general change filter functionality

All looked as expected.