"com.eventstore.dbclient.WrongExpectedVersionException: Expected ExpectedAny but got 39072 instead"

Title. What are the possible conditions where setting ExpectedRevision.any() in AppendToStreamOptions can lead to an exception stating the above. According to the doc for any() it should always succeed, and yet, in this case it somehow doesn’t. How is that possible?

Hey @Rickard_Oberg ,

This behavior is odd to say the least. What is the Java client version you are using? Could you extend on the OS you use, your server version and what operation were you doing when you experienced that error.

@yorick.laupa this is with 5.3.2, I’m running on Win11 laptop, I think the server is 24.2.0, and this is with appendStream(id,options,iterator). I haven’t been able to recreate a minimal failing test, but if I remove using id for events it stops failing, so might be related.