memos: Unhandled Thrown Error! Cannot read properties of undefined (reading 'count')

Hi, when I open memos today, there are some error log displayed on the page and can not view my memos. here are some error logs below. (version 0.4.5)

Unhandled Thrown Error!
Cannot read properties of undefined (reading 'count')
TypeError: Cannot read properties of undefined (reading 'count')
    at https://xxx.xx/assets/index.f618fa86.js:107:19652
    at Qs (https://xxx.xx/assets/index.f618fa86.js:32:24425)
    at ci (https://xxx.xx/assets/index.f618fa86.js:32:42666)
    at S9 (https://xxx.xx/assets/index.f618fa86.js:32:41472)
    at so (https://xxx.xx/assets/index.f618fa86.js:32:40498)
    at ty (https://xxx.xx/assets/index.f618fa86.js:32:37079)
    at Xn (https://xxx.xx/assets/index.f618fa86.js:30:3274)
    at https://xxx.xx/assets/index.f618fa86.js:32:34432
💿 Hey developer 👋

You can provide a way better UX than this when your app throws errors by providing your own errorElement props on <Route>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Thanks @boojack, Looks like the issue is resolved after the upgrade to v0.6.1.

@boojack One more finding is the explore page works properly.

Looking at the docker log:

███╗   ███╗███████╗███╗   ███╗ ██████╗ ███████╗
████╗ ████║██╔════╝████╗ ████║██╔═══██╗██╔════╝
██╔████╔██║█████╗  ██╔████╔██║██║   ██║███████╗
██║╚██╔╝██║██╔══╝  ██║╚██╔╝██║██║   ██║╚════██║
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝███████║
╚═╝     ╚═╝╚══════╝╚═╝     ╚═╝ ╚═════╝ ╚══════╝

Version 0.5.0 has started at :5230
{"time":"2022-10-11T10:29:48Z","method":"GET","uri":"/auth","status":200,"error":""}
{"time":"2022-10-11T10:29:48Z","method":"GET","uri":"/assets/index.19a074d4.css","status":200,"error":""}
{"time":"2022-10-11T10:29:48Z","method":"GET","uri":"/assets/index.06aad460.js","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/logo-full.webp","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/api/user/me","status":401,"error":"code=401, message=Missing user in session"}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/api/status","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/sw.js","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/logo.webp","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/manifest.json","status":200,"error":""}
{"time":"2022-10-11T10:29:49Z","method":"GET","uri":"/logo.webp","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"POST","uri":"/api/auth/signin","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/api/user/me","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/api/status","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/api/user/me","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/api/shortcut?","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/api/memo?rowStatus=NORMAL","status":200,"error":""}
{"time":"2022-10-11T10:29:52Z","method":"GET","uri":"/logo.webp","status":200,"error":""}
{"time":"2022-10-11T10:29:53Z","method":"GET","uri":"/api/tag?","status":200,"error":""}
...
...

From the db structure, the NOT working db file is missing the below three triggers compare with the fresh install db file.

image

And the memo_resource table in the NOT working db file has no records, with the resource table has records after the migration to 0.5.