User Not Logged In - Profile Creation
We have just set up a self hosted option in Docker. The very first page I created a new account and password, but the very next page where you enter your profile name when I enter details it has an error in the bottom right of "user is not logged in" as per the attached screenshot

32 Replies
Are there any logs related to your problem?
Hi, log attached.
Simply its a new install, new DB. All loads up and gets to the enter email screen. This is fine and you enter an email then a password then its the new workspace screen. When you enter this it says "Transaction is not started yet, start transaction before committing or rolling it back".
You cannot go past this. If you click continue a second time it says "workspace is already being created".
Then if you refresh the page it goes to the create profile page where you get the error user not logged in

By log you mean the screenshot or it wasn't attached properly?
Sorry didt hit enter
Hi @Jas0r, can you check your DB and tell me if you have a workspace in active status?
Hi, I dont, in the "core" schema in the table "workspace" there is 1 row and the "activationstatus" is "ONGOING_CREATION".
There is 1 other schema called "workspace_dmro60hwtqv9ngmk9c0vqr8k0" but has not tables
and when you try to create another workspace, same thing?
I have just tried to update my postgres server and found that must have been the issue. New server and new database and everything worked first time thanks
I am also experiencing the same error "Workspace is already being created". Version 0.42.0 I have updated the server and db to match, I am deploying a new app with docker compose.
Additionally, I see many log lines such as "worker-1 | touch: /app/docker-data/db_status: No such file or directory"
Could it be the reason?
Ok, I found the root reason: "QueryFailedError: null value in column "fieldMetadataId" of relation "viewField" violates not-null constraint" https://gist.github.com/huksley/df985054e89346113a29d8685f24085a
I checked v0.41.5 it works.
@Ruslan I cannot reproduce
Could you upgrade to the latest version (v0.42.15) and run upgrade commands according to: https://twenty.com/developers/section/self-hosting/upgrade-guide
then if the error persists, could you check on your browser logs (developer tools in Chrome for instance / Network tab) what query is triggering the error
Hmm.
I was running 0.42.0
I should try 0.42.15
Could you tell me, if I upgrade docker compose (i.e. change tag) do I need to run manually all integrations or do I need to do in sequence 1) change to 0.39.0 & deploy 2) change to 0.40.0 and deploy 3) change to 0.41.0 and deploy
if fieldMetadataId is null in this query, you probably have an issue somewhere else
Because I tried to jump from 0.36.X to 0.42.x and it did not just work
oh that's probably why 😦
yes you need to go step by step at this stage
have you run any upgrade command?
if fieldMetadataId is null in this query, you probably have an issue somewhere elseI am running from docker, I believe I don't have control at that level My bug report based on complete from scratch deployment I just need to try 0.42.15 I suppose No I didnt run any upgrade commands, I can see that worker constantly tries to do upgrades though
it's a different process
so you started a fresh install on 0.35.6, is that right? and then you direclty upgrade to 0.42?
No, bug report with 0.42.0 is fresh install of 0.42.0
oh ok, I was confused by "Because I tried to jump from 0.36.X to 0.42.x and it did not just work"
if you have a fresh install on 0.42 you should be all good
so you started a fresh install on 0.35.6, is that right? and then you direclty upgrade to 0.42?This is just a second problem I have and it is a typical pattern users want to upgrade
we might had a few bugs patched in the patches
Regarding the upgrade, here is the current state:
- you'll need to upgrade minor version by minor version following the upgrade guide. in your .env in your dockerfile you can specify the {TAG} to progressively upgrade.
- this is quite painful as we are rolling out new minor version every two week
- that's being said we are always performing upgrade between minor version on our production data (which is quite big), making the ugprade command usally seamless
Vision (likely in a few months)
- we want to enable the users to auto-upgrade through a script. We are also building an Admin Panel in twenty to help you in this task
yeah well, this is difficult. are you using prisma? I think it automatically applies all missing DB DDL changes, but since twenty crm users db per workspace, it might be different
We are not, we can't as Twenty is multi tenant and each user has its own data model. Prisma is building data model APIs at build time which is not possible for us (we can't rebuild a server every time one of our user updates its data model)
When we upgrade we do 3 things:
- classic migrations on core / metadata schemas
- sync standard objects (they are describe in the code and we want all existing workspaces to get the new updates)
- run custom commands, for example some data migration or anything that cannot be captured by the basic tooling
In my own startup, I also have an issue with db DATA changes after upgrades, I don't want to run them manually, but see no option right now in prisma to suppo
Twenty is multi tenantexactly
yep, I think by design they can't do it
they provide a great strongly typing API but this need to be built at built time
typeORM is much more flexible (you can dynamically load entities) but the typing is way more limited (and often incorrect)
But people often complain PrismaORM does not work well with many tables - typings grow megabytes in size, become unusable or slow. Maybe VS Code will catchup or MacBook Pro M6+ will help haha
haha yes indeed
you can also face max typescript nesting limit
ok, I tested 0.42.15 - it works ok! Deploys with docker-compose, I can create a workspace successfully. I have updated my template and docker-compose. One thing I noticed - translation missing - see at the botton

Hello @Ruslan, this is a known issue that should be fixed in the following days
This the
advanced mode
toggle button