deepstream.io: Invalid state transition. Details: {"transition":"MERGED","state":"READY"}
I’ve faced with the following error for some records during trying to update record:
Invalid state transition.
Details: {"transition":"MERGED","state":"READY"}
History:
From - to LOADING_OFFLINE via -
From LOADING_OFFLINE to SUBSCRIBING via 23
From SUBSCRIBING to READY via 4
StateMachine.transition @ state-machine.ts:37
RecordCore.onRecordRecovered @ record-core.ts:767
eval @ merge-strategy-service.ts:75
exports.REMOTE_WINS @ merge-strategy.ts:8
MergeStrategyService.merge @ merge-strategy-service.ts:74
RecordCore.recoverRecordFromMessage @ record-core.ts:726
RecordCore.RecordHandler @ record-core.ts:480
RecordHandler.handle @ record-handler.ts:411
eval @ connection.ts:323
Connection.onMessages @ connection.ts:297
socket.onmessage @ socket-factory.ts:42
Code is simple:
const { DeepstreamClient } = window.DeepstreamClient;
const client = new DeepstreamClient(url, { path: '' } );
client.login((success) => {
if (success) {
client.record.getRecord('user').whenReady((record) => {
record.set('test', 1);
});
}
});
There are many following messages in pm2 error logs:
VERSION_EXISTS | open tried to update record user to version 19633 but it already was 19632
Server version: 5.1.1
Client version: 5.1.4
What is the reason for the error? How can the error be fixed?
Thank you
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 30 (10 by maintainers)
I’ve been able to reproduce the issue by following steps.
I think this case should be handled by Deepstream Client
i’ll take a look at this this weekend, seems quite a few people are running into it
thank you for the code! yeah that should be covered.
I’m currently a bit busy on another deadline, but will pick this up as soon as I have time.
Closing this for now. Please re-open if issue persists.