question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
DHS1001commented, Oct 23, 2022

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

1reaction
DHS1001commented, Oct 11, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
TypeError: Cannot read properties of undefined (reading 'id')
What is happening: The function itemToForm() is being called before the this.item is ready. There are many strategies to avoid this error.
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError: Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an undefined...
Read more >
Cannot read properties of undefined (reading 'length') - TrackJS
This message indicates that our code expects to have an object with a length property, but that object was not present. length is...
Read more >
error in setup: "typeerror: cannot read properties of undefined ...
Here's an example of a JavaScript TypeError: Cannot read property 'length' of undefined thrown when the length property is attempted to be read...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found