Hi there, while tesing I am creating a team and assign a user as owner. I set up the team in the beginning and delete it after the test is finished. After running the test once I cannot create a team with the same id as before nor can I delete or find the team.
The following code creates this output:
total teams: 0
AppwriteException: team_already_exists, Team with requested ID already exists. Please choose a different ID and try again. (409)
Team id: eventId
AppwriteException: team_not_found, Team with the requested ID could not be found. (404)
The code creating the above output:
TeamList teamsList = await teams.list();
print('total teams: ${teamsList.total}');
// Create the team of the event
try {
await teams.create(teamId: eventId, name: eventId);
} catch (e) {
print(e.toString());
print("Team id: $eventId");
}
// Add the owner to the team as owner
await teams.createMembership(
teamId: eventId,
userId: ownerId,
roles: ['owner', 'guest'],
url: 'https://cloud.appwrite.io',
);
Has anyone an idea why this is happening?
Team already exists but cannot be deleted or found
Hi, I just tried reproducing the error. It works fine for me π€
Well all I am doing is creating a team with a fixed id and then deleting it at the end of the test. Then when I am running the test again, I get this output. When I then change the fixed id to something new, it works for some time until it fails again. Cannot realy tell you more π
I did the same thing, and it worked for me. Will discuss with the team and get back to you
Would be great, because it is really annoying...
Do you see the team in the Appwrite console?
No the team does not appear in the console
weeeeiiirrddd.....what's your project id and the team id?
Project id: 6539157bd8232bf0b5c0 and the team id i was testing with was simply eventId or testEventId
oye...can you please delete that team you created?
ok...you have 0 teams now right?
Yes there should be 0 teams right now
The project itself should be very empty to be honest π
Another thing I am experiencing right now: When I delete a team with some members and recreate a team with the same team id the members are not deleted but do still exist. Additionally when I add the same user to the team again with the same roles as before he gets added and is now twice a member. I would have expected two things, firstly when I delete a team all memberships should be deleted as well and secondly I expect to add a user only once to a team and throw an exception otherwise
so does creating the team work now?
Additionally when I add the same user to the team again with the same roles as before he gets added and is now twice a member
It would be good to create 1 issue for this
when I delete a team all memberships should be deleted as well
They should...but this happens as a background job. maybe there was just a delay in deleting all the memberships?
Well every now and then, it does not feel like anything changed
Could be, I'll check this later
Will do that π
how are things now?
have you had a chance to create the issue?
Recommended threads
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...