Page MenuHomePhabricator

internal_api_error_InvalidArgumentException in wbformatvalue (when editing statements)
Closed, ResolvedPublic

Description

I get an exception in wbformatvalue when trying to edit statements on certain Wikidata items:

 mw1207 wikidatawiki 1.28.0-wmf.15 exception ERROR: [V7S85wpAANIAAHtaRLQAAACC] /w/api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%7B%22value%22%3A%7B%22entity-type%22%3A%22item%22%2C%22numeric-id%22%3A11299%7D%2C%22type%22%3A%22wikibase-entityid%22%2C%22error%22%3A%22serialization+is+required+for+constructing+a+EntityId+and+must+be+a+string%22%7D%2C%22type%22%3A%22undeserializable%22%7D&options=%7B%22lang%22%3A%22en%22%7D&generate=text%2Fplain&property=P131   InvalidArgumentException from line 49 of /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/lib/includes/DataValueFactory.php:  {"exception_id":"V7S85wpAANIAAHtaRLQAAACC"} 
[Exception InvalidArgumentException] (/srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/lib/includes/DataValueFactory.php:49) 
  #0 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/lib/includes/DataValueFactory.php(79): DataValues\DataValueFactory->newDataValue(string, array)
  #1 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(191): DataValues\DataValueFactory->newFromArray(array)
  #2 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(98): Wikibase\Repo\Api\FormatSnakValue->decodeDataValue(string)
  #3 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(1435): Wikibase\Repo\Api\FormatSnakValue->execute()
  #4 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(508): ApiMain->executeAction()
  #5 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(479): ApiMain->executeActionWithErrorHandling()
  #6 /srv/mediawiki/php-1.28.0-wmf.15/api.php(83): ApiMain->execute()
  #7 /srv/mediawiki/w/api.php(3): include(string)
  #8 {main}
Caused by: [Exception Deserializers\Exceptions\UnsupportedTypeException] (/srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/vendor/data-values/serialization/src/Deserializers/DataValueDeserializer.php:108) 
  #0 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/vendor/data-values/serialization/src/Deserializers/DataValueDeserializer.php(98): DataValues\Deserializers\DataValueDeserializer->assertHasSupportedType()
  #1 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/vendor/data-values/serialization/src/Deserializers/DataValueDeserializer.php(93): DataValues\Deserializers\DataValueDeserializer->assertCanDeserialize()
  #2 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/lib/includes/DataValueFactory.php(47): DataValues\Deserializers\DataValueDeserializer->deserialize(array)
  #3 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/lib/includes/DataValueFactory.php(79): DataValues\DataValueFactory->newDataValue(string, array)
  #4 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(191): DataValues\DataValueFactory->newFromArray(array)
  #5 /srv/mediawiki/php-1.28.0-wmf.15/extensions/Wikidata/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(98): Wikibase\Repo\Api\FormatSnakValue->decodeDataValue(string)
  #6 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(1435): Wikibase\Repo\Api\FormatSnakValue->execute()
  #7 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(508): ApiMain->executeAction()
  #8 /srv/mediawiki/php-1.28.0-wmf.15/includes/api/ApiMain.php(479): ApiMain->executeActionWithErrorHandling()
  #9 /srv/mediawiki/php-1.28.0-wmf.15/api.php(83): ApiMain->execute()
  #10 /srv/mediawiki/w/api.php(3): include(string)
  #11 {main}

https://www.wikidata.org/w/api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%7B%22value%22%3A%7B%22entity-type%22%3A%22item%22%2C%22numeric-id%22%3A11299%7D%2C%22type%22%3A%22wikibase-entityid%22%2C%22error%22%3A%22serialization+is+required+for+constructing+a+EntityId+and+must+be+a+string%22%7D%2C%22type%22%3A%22undeserializable%22%7D&options=%7B%22lang%22%3A%22en%22%7D&generate=text%2Fplain&property=P131

https://www.wikidata.org/wiki/Q7588566

(other items are not a problem for me, but surely there are other affected items)

Event Timeline

aude created this task.Aug 17 2016, 7:40 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2016, 7:40 PM
aude added a comment.Aug 17 2016, 7:46 PM

I don't see this in the logs for the past 7 minutes. It might be a very limited number of pages affected.

aude added a comment.Aug 18 2016, 1:59 PM

action:wbformatvalue
format:json
datavalue:{"value":{"value":{"entity-type":"item","numeric-id":11299},"type":"wikibase-entityid","error":"serialization is required for constructing a EntityId and must be a string"},"type":"undeserializable"}
options:{"lang":"en"}
generate:text/plain
property:P131

Change 305509 had a related patch set uploaded (by Aude):
Bump cache epoch for Wikidata

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

aude added a comment.Aug 18 2016, 2:52 PM

other pages are affected, such as https://www.wikidata.org/wiki/Q13677 (probably anything that comes from parser cache with old entity id serialization in the wbEntity config variable)

Change 305509 merged by jenkins-bot:
Bump cache epoch for Wikidata

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

aude closed this task as Resolved.Aug 18 2016, 3:27 PM
aude claimed this task.
aude removed a project: Patch-For-Review.