Reproduction (while creating and removing a statement with no page reload:
- Create an item
- Create any statement & save it
- Try to remove the statement
- You'll receive the error message
Other reproductions are possible, and I guess this will work for any cases when you create and save a statement and then try to change it in any way without reloading the page.
On Items the updated baserevid is used.
This only seems to happen with Lexeme statements and not with Form statements.
Network requests:
The request to create the statement was:
```
action: wbsetclaim
format: json
claim: {"type":"statement","mainsnak":{"snaktype":"value","property":"P730","datavalue":{"type":"wikibase-entityid","value":{"id":"Q365815"}}},"id":"L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1","rank":"normal"}
baserevid: 1002877
bot: 1
token: XXXX+\
```
With response:
```
{"pageinfo":{"lastrevid":1002878},"success":1,"claim":{"mainsnak":{"snaktype":"value","property":"P730","hash":"ad5cce903831858c590742e23a8e808227e5ae71","datavalue":{"value":{"entity-type":"item","numeric-id":365815,"id":"Q365815"},"type":"wikibase-entityid"},"datatype":"wikibase-item"},"type":"statement","id":"L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1","rank":"normal"}}
```
And the remove request was:
```
action: wbremoveclaims
format: json
claim: L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1
baserevid: 1002877
bot: 1
token: XXX+\
```
With response:
```
{"error":{"code":"invalid-guid","info":"Invalid claim guid.","messages":[{"name":"wikibase-api-invalid-guid","parameters":[],"html":{"*":"Invalid claim guid."}}],"*":"See https://wikidata.beta.wmflabs.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"servedby":"deployment-mediawiki-09"}
```
Reloading the page and removing again succeeds with the following request:
```
action: wbremoveclaims
format: json
claim: L11$ca0a13c9-424d-0a4e-c8c7-53a39bd870d1
baserevid: 1002878
bot: 1
token: XXX+\
```
**Note: the updated baserevid**
Screencast (for statement creation and removal):
{F18134007}
Screencast (for a similar action, creating a statement then trying to add a reference):
{F18134052}