v0.33.3: TypeError: Cannot read properties of undefined (reading 'fieldMetadataId')
Congratulations on the 0.33 release. I am excited to use the multi select filter!
I upgraded with no issues, following the insturctions at https://github.com/twentyhq/twenty/blob/main/packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx#v0320-to-v0330 there were no errors in my update log.
After upgrading the API interface works. However, in the web interface I am geting the error
TypeError: Cannot read properties of undefined (reading 'fieldMetadataId')
Has anyone else experienced this (@ɃØĦɆᵾS )? Does anyone know what might have gone wrong and how i can fix it? Thanks!GitHub
twenty/packages/twenty-website/src/content/developers/self-hosting/...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty
24 Replies
Oh, I experienced that one
I resolved this by simply restarting database since I don't have any important data
Thanks. Unfortunately I have a years worth of data to protect 🙂 I launced an issue, thanks. https://github.com/twentyhq/twenty/issues/8693
GitHub
fieldMetadataId error after upgrading to v0.33.3 · Issue #8693 · tw...
Bug Description Congratulations on the 0.33 release. I am excited to use the multi select filter! I upgraded with no issues, following the insturctions at https://github.com/twentyhq/twenty/blob/ma...
That's understandable
thanks for confirming mate
I'll try to reproduce it somehow, tbh didn't bother with reporting it as I thought it's something on my side
No problem
Hi @Rob something went wrong with the upgrade command most likely. Do you have access to the DB? Can you check if you have any viewField rows that have a viewId as null?
will look now!
should i look in any table in particular?
you should look at your workspace schema (the one starting with workspace_*) and the viewField table
thanks. And for your records/debugging, here the update log
@Weiko you were correct, many rows have viewid as null
any suggestions how to fix this?
Ok. This is from legacy code and we clearly missed that, viewFields should always be linked to views by now and should have been for a while.
Because of this, the "EnforceUniqueConstraints" step in the 0.33 upgrade messed up your table. As you can see, the command interpreted all your viewFields as duplicates and soft deleted them (deletedAt is not NULL).
I'd suggest you restore those by updating the "deletedAt" colomn to NULL for all those records and your page should load again
thanks for the insight!
how can i set all the deletedAt column to NULL?
Do we need to fill in the viewID column with data and not Nulls?
should be good
and YOURSCHEMA would be "workspace_6irr16qioalagnvc5ffeneuhx" in this situtaion?
Yes
Yes 🙂
No actually that's the issue, they shouldn't be there in the first place, I suggest you delete them.
I guess you won't be the only one affected, we need to land a patch with a command that should sanitize the table before the EnforceUniqueConstraints step
So i should delete the column somehow?
Just null all records
null the viewwID records too?
Let's not delete anything for now, just update the deletedAt row and see how it goes 🙂 (with the SQL query above)
it seems to be working!! I will investigate more and report back in a few hours
thanks for the help!!!
Great 👍
I have been using the setup for a while and haven't hit this error again. Thanks @Weiko