-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Updated to 0.34 and now cannot login - "You're not member of this workspace." #9041
Comments
+1 to this, got this after upgrading too, looks like a bad DB migration? |
I get |
Hello, Did you run the migration ? there is a new column |
Yes i did ran the migrations inside docker... i cannot remember if i ran it on server or on worker... which docker should i run this commands? Also, the docu page doesnt explain it so well... |
Here is the migration documentation Depending on your setup you can run migration scripts in docker or not. Today it continues to fail? For you too @chrisjenx ? |
The docker containers suggestion they auto migrate?
|
On that note I would use something like flyaway for sanity sake.
|
i just did a clean install... and it now works ok.... i ran those commands on "server" docker... |
I have an existing installation and I got this issue - I ran the migrations as described. I don't want the multi workspace feature to be enabled, since I don't need it and am happy with the current configuration. I have ensured that IS_MULTIWORKSPACE_ENABLED is false. When I run the upgrade-0.34 command I see
Where xxxx is the name of my original workspace. So I presume that it now expects me to login at xxxx.<original base domain> - however this not valid for my networking/route configuration? |
Ahh yeah makes me wonder if the db migration goes fine, but it's doing as said above, trying to log me into a subdomains (which we don't use for selfhosted) |
Even if you use the single workspace mode the subdomain column is added and a unique subdomain is generated. But it's not used in your use case. So you should be able to continue using your instance without a subdomain. |
OK so after running the migration manually then rebooting the docker containers it came back up. It did throw an error initially which seemed to trigger a on the fly fix (logs attached) now I can login.
|
I still can't login. I ran the migrations, shut down the containers, booted back up. Looking at logs I see this error
Seems that I have the same problem re: the multiple workspaces (even though I only have one afaik). |
Okay - this is the ideal behaviour. For what it's worth, I did try changing my networking to put the subdomain in, and it made no difference - same error. |
Check user [email protected] / Applecar2025 The database:reset command's default configuration is to create 2 seed workspaces so maybe you ran it at the beginning and created those 2. I updated the docs to clarify this |
I also can't login to the main Workspace after upgrading to 0.34. I see 3 subdomain are generated for 3 Workspaces. Only this works at the moment. Login/Workspaces worked fine initially after upgrading. But then after logging out this issue happened. |
@usag1r If you run without the multi-workspace mode enabled you can safely delete the two other workspaces in the database? Can you try that, please? |
We found the issue. This PR should fix it #9148 If you want to fix the issue before the release you can keep in your database the single workspace you used and remove the others. |
Fantastic. Deletion of seed Workspace from admin panel after logging in with dummy user worked like a charm. Thanks so much! I would say due to nature of CRM applications, extra extra caution is required in upgrades both from user and developer sides. Also I think seed ids are unique for each deployment. |
Yeah, you're right, I'm really sorry for the issue. Seed IDs are constants that's why we can exclude them. |
Interestingly. I can't login with dummy user in one of my deployments. So for this particular deployment, both [email protected] and real users are not working and can't delete the seed Workspace that way. I remembered a detail. I think I've added [email protected] to the main Workspace I was using for test purposes. So potentially this might be causing the issue with logging in to seed Workspace. Multi workspace is disabled so login screen works properly. I think it may be because I deleted seed user or workspace previously... |
Is there going to be a hotfix for this issue like 0.34.1? |
This issue occurs when several workspaces are in your database and your instance is in a single workspace mode. This PR, #9112, prevents the creation of seeds when it's not necessary to avoid this breaking state. To fix this issue keep only one workspace in your database. The fix is not retroactive. You must delete the useless workspaces in your database. The workspace ids should be: The SQL query to delete the seeds workspaces: DELETE FROM core.workspace WHERE id IN ('20202020-1c25-4d02-bf25-6aeccf7ea419', '3b8e6458-5fc1-4e63-8563-008ccddaa6db') |
Isn't it better approach to give the user ability to choose the workspace while logging in. This way users can work with multiple workspaces in self-hosted environment without subdomain. And future login bugs would have been avoided as well. One particular strong use case is, especially since we don't have user roles in twenty, when user has a private workspace and a shared workspace with other members. Does it make sense for future development? |
I examined multiple fresh and old setups and couldn't see any of those ids. It suggests ids are always unique even for seed workspaces? However I see something strange, 1 account has workspace status stuck at PENDING_CREATION. I think this could be the issue why I can't login at all. I'll try to delete them all except main workspace, fingers crossed. |
So I finally solved issues with "You're not member of this workspace." on my end. Seed workspaces had users such as tim+[increment] as below: [email protected] I think what must have happened is where multiple workspaces exist usernames were automatically incremented by 1. If anyone can't login, by logging in via one of these users and then deleting the workspace from UI as @FelixMalfait suggested or from database connection as @AMoreaux suggested solves the problem. |
I also ran into this issue, but also with a foreign key constraint on a user that was used to create the user workspace. In that case I wasn’t able to delete the workspace. If the workspace has a user associated with the workspace you will not be able to delete the workspace. So, obviously you should back up your db before performing any manual queries. After you’ve backed up you can run a pg query like:
You would need to do this BEFORE running @AMoreaux ’s query to delete the workspace only if a user is associated with it:
|
This was not the case for me. |
Bug Description
I updated my instance of twenty 0.33.0 to 0.34.0 and then i cannot login... i used to
Example:
Expected behavior
Expected to login and enter to the workspace ...
Technical inputs
When i installed 0.33, i used to have this vars in .env
SIGN_IN_PREFILLED=false
DEBUG_MODE=false
IS_MULTIWORKSPACE_ENABLED=true
Also, when i noticed These variables were not in use, i added them manually in the docker compose file --> section "server"....
Now i tried to disable all of those changes and vars... but nothing seems to work..
The text was updated successfully, but these errors were encountered: