Open eshurakov opened 4 years ago
@belcherj was this fixed by https://github.com/Automattic/simplenote-electron/pull/2455 or is that a separate issue?
This is still an issue. We have different encoding on different platforms and when the encoding is different we run into issues.
This is because ios hashes differently than Android and Web
There's a user report in 3642690-zen with a video recording.
I ran into something similar today in two different scenarios where it ended up with a blank tag on a note and the tag not showing in the tag list.
Scenario 1
Scenario 2
https://user-images.githubusercontent.com/1326294/106289665-edea5e00-621f-11eb-8ece-077eebf31d93.mov
I bumped into this issue too while I was working in adding the tags to the history screen. In my case, I managed to reproduce the Scenario 1 from the previous comment.
As far as I investigated, this problem could be related to the flow when a remove operation is sent while having multiple clients connected to the web socket.
In the following logs, you can see the messages I captured from the web socket connections of both clients when deleting the tag tag-6
:
Message sent:
{
"o": "-",
"id": "tag-6",
"ccid": "<MESSAGE_CID_1>"
}
Message received:
[
{
"clientid": "<CLIENT_ID_WEB>",
"id": "tag-6",
"o": "-",
"ev": 2,
"cv": "<CV_1>",
"ccids": ["<MESSAGE_CID_1>"]
}
]
Message received:
[
{
"clientid": "<CLIENT_ID_WEB>",
"id": "tag-6",
"o": "-",
"ev": 2,
"cv": "<CV_1>",
"ccids": ["<MESSAGE_CID_1>"]
}
]
Message sent: [the tag was already removed so probably we shouldn't send this message]
{
"o":"-",
"id":"tag-6",
"ccid":"<MESSAGE_CID_2>"
}
Message received: [Simperium responds with a 404
because the tag was already removed]
[
{
"ccids": ["<MESSAGE_CID_2>"],
"id": "tag-6",
"clientid": "<CLIENT_ID_ELECTRON>",
"error": 404
}
]
As you can see, when the remove operation is received in the Electron client, it tries to send another message with a remove operation for the same tag and receives an error because it was already removed.
I haven't checked further but my impression is that the error message is not handled properly because I noticed that the message is not removed from the channel's local queue after this. Most likely this leads to blocking any message for that tag because it keeps waiting for the previous message to be sent. So when the same tag is created in the Electron client, the update message is not being sent to Simperium. However the client sends the note update message that includes the tag, producing on the Web client the error mentioned in this issue about having an empty tag.
Renaming a tag from iOS results in a blank tag showing inside a note in the web app. Trying to do something with this tag later in the web app results in tags duplication and synchronization issues.
Please take a look at the following video: Tags.mov.zip
Expected
Tags look and order is the same on all devices.
Observed
Reproduced
t1
,t2
,t3
,t4
to the notet2
tot2-1
t2
in the note becomes emptyt2-1
tot2-1-1
t2-1-1
Where did you see the bug