T
Twentyβ€’7d ago
dasco

blocknote.map is not a function

Hello team, Have a new issue that started happening either in the front when accessing companies or notes, was able to reproduce it in the backend when calling the /notes endpoint :
No description
14 Replies
dasco
dascoOPβ€’7d ago
For context, I have created a script to automatically create notes and used the blocknote JS format (wanted to use markdown but when creating notes with the notes V2 with only Markdown, appaeared as blank in the frontend), I wonder if something went wrong there, or maybe in the note targets πŸ€” Let me know how I can provide more info to figure this out Issue happened on v.0.50.0, updated to v.0.50.1 but still happens
dasco
dascoOPβ€’7d ago
No description
No description
dasco
dascoOPβ€’7d ago
@Prastoin found this https://www.answeroverflow.com/m/1341137711481884673 from 2 months ago, maybe it's the same issue ?
`useFindManyRecords for "notes" error : ApolloError: blocknote.map ...
I get a the error blocknote.map is not a function when loading the notes page. Console log shows the following error: useFindManyRecords for "notes" error : ApolloError: blocknote.map is not a function any ideas?
Prastoin
Prastoinβ€’7d ago
Hey @dasco ! Have you been hitting the api directly to insert notes lately ?
dasco
dascoOPβ€’7d ago
Indeed
Prastoin
Prastoinβ€’7d ago
If yes seems like you have null values that should be defaulted to either empty object or empty array
dasco
dascoOPβ€’7d ago
used the V2 -> Blocknote part of the API
Prastoin
Prastoinβ€’7d ago
Would double check by creating an empty note using the UI or check others rows ATM on holidays and mobile but would love if you could open a GitHub issue about the fact that api is not validating data correctly
dasco
dascoOPβ€’7d ago
Will try as soon as my meetings end, but don't know how I can see them because of the 404 error on the backend, but will def do the github issue πŸ™‚
Prastoin
Prastoinβ€’7d ago
To fix your issue you should be able to make any null value to empty array ( I think to double check ) using psql or whatever db explorer
dasco
dascoOPβ€’7d ago
maybe directly on the postgre db hahaha exactly, ok will update this thread with what I find πŸ™‚
Prastoin
Prastoinβ€’7d ago
Sounds great ! Enjoy coding
dasco
dascoOPβ€’4d ago
TY enjoy your holidays ! As an update, I did remove recent rows from the db in Notes and it fixed it (sorry it was not an efficient fix and couldn't pinpoint the exact issue, I got frustrated :D)
Prastoin
Prastoinβ€’4d ago
No worries all good ! We should refactor the api to be stricter it should not allow data insertion that result in such error Enjoy coding !

Did you find this page helpful?