Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting general channel does't work consistently #1523

Closed
kingalg opened this issue May 12, 2023 · 10 comments
Closed

Deleting general channel does't work consistently #1523

kingalg opened this issue May 12, 2023 · 10 comments
Assignees
Labels
bug Something isn't working security

Comments

@kingalg
Copy link
Collaborator

kingalg commented May 12, 2023

Desktop: Version: 1.2.1-alpha.3
Mobile: [email protected]

System: ios and android
I didn't encounter it on desktop but @vinkabuki did. It also happen to me only for general but potentially it may happen for any channel.

What happens:

  1. I had "owner" on desktop, two desktop users and two mobile users (ios and android).
  2. Owner removed general.
  3. On all desktops general was successfully deleted.
  4. Both ios and android still have general - they both get the info that "xyz deleted all messages in #general") but old messages are there. You can see it below.

Screenshot 2023-05-12 at 13 56 52

It doesn't happen every time as after several attempts I've deleted messages from general on mobile.

@Kacper-RF
Copy link
Contributor

Pull request(draft) with a detailed list of subtasks:
#1525

@holmesworcester
Copy link
Contributor

@Kacper-RF some questions:

  1. what happens in the new design if someone makes multiple channels with the same name?
  2. what happens if two people do it simultaneously or maliciously
  3. is channel.address the right name for this? i think address is a legacy name from when we used Zcash and that we should just use channel.id or something else

@Kacper-RF
Copy link
Contributor

@holmesworcester
1 & 2. : We have check in channel creation method in desktop and mobile package, that you can't create second channel with the same name - video

channel-create-validate.mp4
  1. I talked about naming with Marek, and he also thinks that address is not very intuitive in that case now. So I will change that to channel.id, but it will take some time.

Also short update, what has been achieved today:
-fixed state manager tests
-fixed backend unit tests
-fixed standard desktop components tests( not RTL tests)
-fixed e2e tests
-fixed mobile unit tests

And I started working on fixing RTL tests, so tomorrow i will be focus on these and later switch to mobile local app testing and fixing detox tests.

After I will complete whole fixing process and app will be working without issues on desktop and mobile i will start process of changing channel.address to channel.id .
It will be much easier for me then, because i will be knew every place( from git diff ) in the code that needed to be changed

@holmesworcester
Copy link
Contributor

Okay.

So it will still be possible to create channels with duplicate names, because two clients can make changes that the other isn't aware of. What will happen in this case? We should have tests to make sure it works as expected.

@vinkabuki
Copy link
Contributor

It's not clear for me what was the previous behavior of this, probably backend would throw exception, we never tested that and it never happened. this is super super edge case very very unlikely to happen. atm it will probably not throw exception but it will create two separate databases for the same channel and messages from both of those will be aggregated into one channel on frontend.

We have that case in mind ofc, but this is way less important and complicated than adding backward compatibility for channels after refactoring address to id

@holmesworcester
Copy link
Contributor

holmesworcester commented May 22, 2023

We tested the previous behavior, as I remember. What would happen is that the newly created channel would simply be the same channel. It was weird but acceptable.

Let's write a test for this case to make sure nothing bad happens and it behaves as we expect.

For example:

  1. Users who, when not connected, create a channel with the same name don't see error.
  2. Messages sent to this channel display as expected.
  3. Channel can be deleted as expected.

It's okay if there are two channels with the same name. Or if both channels get merged into one. As long as everything behaves well, e.g. the three above criteria are met.

@kingalg
Copy link
Collaborator Author

kingalg commented Jun 1, 2023

I need to wait for #1545 to be fixed before checking this one. Right now it doesn't look good, but fixing #1545 may change everything.

@kingalg
Copy link
Collaborator Author

kingalg commented Jun 1, 2023

On desktop it's working ok, but on mobile we are still having issues. They will be handled in separate issue: #1550

@kingalg kingalg closed this as completed Jun 1, 2023
@holmesworcester
Copy link
Contributor

I'm still seeing multiple general channels on mobile in 1.3.0

@kingalg
Copy link
Collaborator Author

kingalg commented Jun 7, 2023

1.3.1 - fixed

@kingalg kingalg closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security
Projects
Archived in project
Development

No branches or pull requests

4 participants